[openbox] Move to last desktop
Jim Rees
rees at umich.edu
Mon Dec 10 16:21:59 EST 2012
David Vogt wrote:
Since a few days, I have added a few shortcuts for creating and removing
virtual desktops. When a new desktop is created, I want it to be at the
end (which works nicely), and then go there and use it.
However, this seems not to work. There is no <action> to go to the last
desktop. So currently, I'm using this ugly hack that works, but... well
it's a hack:
<action name="AddDesktop">
<where>last</where>
</action>
<action name="execute">
<execute>notify-send -t 2000 "New Desktop created"</execute>
</action>
<action name="execute"><execute>wmctrl -s 2</execute></action>
<action name="execute"><execute>wmctrl -s 3</execute></action>
...
<action name="execute"><execute>wmctrl -s 12</execute></action>
As long as you're willing to use ugly hacks, how about this?
wmctrl -s `wmctrl -d |tail +2 |wc -l`
Faster, less typing, and no upper limit on number of desktops. Better, use
"expr" instead of "tail" but you'll have to work out the double eval.
More information about the openbox
mailing list