Registered Member
|
Hello,
is there any qdbus-command to switch explicitly to a specific Desktop, for example Desktop1? There are keyboard shortcuts mapped default to that CTRL+F1 and CTRL+F2, but I don't know how to invoke them with qdbus. Another option would be: There is a difference between assigning switch to "next desktop" with shortcut keys and "qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop" If I assign a Global Key under Settings - Workspace Behaviour - Virtual Desktops - Switching - Switch to Next Desktop", then this key switches to next desktop until last desktop and then stops (which is what I want also for the qdbus command), while "qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop" assigned to a Global Shortcut Command/Url goes back to the first desktop if pressed again? Is there any way to assign a qdbus command that also stops at last desktop and another one respectively at first desktop? |
Registered Member
|
Best regards
Mirosław Zalewski |
Registered Member
|
Thanks Minio, that works in this case (as I only have two desktops)
As for a more than two desktops scenario: I just noticed that when you TICK "Desktop navigation wraps around", a Keyboard shortcut assigned to "Switch to Next Desktop" behaves the same way as the qdbus command nextDesktop. Just when you UNTICK it, the shortcut stops flipping back to first desktop, while a shortcut invoking the qdbus command ignores this setting and continues to "warp to first". |
Administrator
|
Interesting behaviour. This is probably due to the implementation of this option.
I'm going to move this to the KWin forum so the KWin developers can see this and comment.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
|
there's indeed
void Workspace::nextDesktop() as well as void Workspace::slotSwitchDesktopNext() where only the latter has support for options->isRollOverDesktops() No idea whether that's intended or just cruft. |
Registered Member
|
so is there a dbus command for Workspace::slotSwitchDesktopNext() ?
|
KDE Developer
|
no, but it's part of the KWin Scripting Interface and in general KWin accepts scripts through D-Bus. Though it's tricky and in general I would not recommend to use that. |
|
the question actually is whether the differently behaving nextDesktop() function is there by intent or just rotten code (so that the dbus interface should rather bind to slotSwitchDesktopNext
|
KDE Developer
|
5 EUR on rotten code and another 5 on git blame won't tell us (ending in our moving commit for kwin III) |
Administrator
|
Have you tried the "-M" and "-C" options to git blame?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
just did so for the code in question:
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft