PDA

View Full Version : Action to toggle workspaces/desktops in Lubuntu



Daniel_Rosehill
February 25th, 2016, 03:16 PM
Hi guys,

I'm trying to set up a key binding in my lubuntu-rc.xml to toggle between my two work-spaces.

There are already pre-configured options for moving to the workspace to the left or the right, but I want to map a key to a toggle option to display the other work-space than the one currently open (or if there were three or more workspaces to keep switching between all of them without hitting a 'stop' on either end).

I think what I need is some action along the lines of: if on workspace one, action is show workspace two. If on workspace two, action is show workspace one, etc.

This behavior isn't one of the default keybindings. (https://help.ubuntu.com/community/Lubuntu/Keyboard)

Is there a way to configure this?

vasa1
February 25th, 2016, 04:39 PM
I don't use workspaces but have you tried changing <wrap>no</wrap> to <wrap>yes</wrap>?


<!-- Keybindings for desktop switching -->
<keybind key="C-A-Left">
<action name="GoToDesktop">
<to>left</to>
<wrap>yes</wrap>
</action>
</keybind>
Run openbox --reconfigure to make changes to lubuntu-rc.xml take effect.

Now, if you keep pressing C-A-left, you'll cycle through all available workspaces (desktops). I'm not sure this is what you asked for but it's based on what I read here: http://crunchbang.org/forums/viewtopic.php?id=35258.

BTW, I'd think that toggle refers to alternating between two states or options.

Daniel_Rosehill
March 1st, 2016, 08:29 AM
Sorted (turning on the wrap tag).

Thanks a lot!

vasa1
March 1st, 2016, 08:47 AM
Welcome!