Bug 482817 - qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId return not correct ID
Summary: qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId retur...
Status: REPORTED
Alias: None
Product: yakuake
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-08 05:43 UTC by Max
Modified: 2024-03-11 18:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2024-03-08 05:43:30 UTC
Create multiple tabs
1 2 3 4
Close the last three so that only the first remains
1
Create more tabs
1 2 3
Now, in tabs 2 and 3, the method begins to return an incorrect ID.
If you continue to close tabs except the first and create new ones, then the ID will increase.

qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId
5
Comment 1 Max 2024-03-08 16:26:33 UTC
I need for this

id=$(qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId)

qdbus org.kde.yakuake /Sessions/$id org.kde.konsole.Session.setProfile "Profile 1"
Comment 2 Christian Muehlhaeuser 2024-03-11 11:20:46 UTC
I think that's intended behavior and the session ids seem to be correct. What problems is this causing?
Comment 3 Max 2024-03-11 15:12:08 UTC
I need to change the profile on the hot key. I get ID:
id = $ (qdbus org.kde.yakuake / yakuake / sessions org.kde.yakuake.activeSessionId)
The numbering is 0 1 2 3 4 5 ...
Then, use it to change the profile:
qdbus org.kde.yakuake /Sessions/$id org.kde.konsole.Session.setProfile "Profile 1"

The fact is that here /yakuake/sessions ID will be incremental after closing the tabs.
And here /Sessions numbers go without considering closed tabs (always 1 2 3 4 5 ...).
Until the tabs close, everything works. When several tabs close (those on the right),
then here /yakuake/sessions the numbering becomes so 0 4 5 8 ... And it becomes impossible,
use of this data here /Sessions/$id
Comment 4 Christian Muehlhaeuser 2024-03-11 18:40:06 UTC
The hotkeys and IDs may initially match, but I don't think this is something we can establish. After all, you can also move the tabs around, which will also affect their hotkey but not their IDs.