[openbox] Move all windows to other desktop
Mikael Magnusson
mikachu at gmail.com
Sun Sep 6 18:28:54 EDT 2015
On Thu, Sep 3, 2015 at 2:34 PM, Mathias Dufresne
<mathias.dufresne at gmail.com> wrote:
> In my menu.xml I did added both your nice tricks as follow:
>
> <menu id="apps-desktop-mgmt" label="Desktop Management">
> <item label="New Desktop before that one">
> <action name="AddDesktop">
> <where>current</where>
> </action>
> </item>
> <separator />
> <item label="Move all windows to previously visited desktop">
> <action name="ForEach">
> <desktop>current</desktop>
> <then>
> <action name="SendToDesktop">
> <to>last</to>
> </action>
> </then>
> </action>
> </item>
> </menu>
>
> This works when adding a new desktop but I'm not able to move all windows at
> once.
I forgot follow is on by default for SendToDesktop, which is not so
great in the ForEach action, add <follow>no</follow> in there after
the </to> and it should work.
I was going to suggest the following too,
<item label="Swap windows with last desktop">
<action name="ForEach">
<omnipresent>no</omnipresent>
<then>
<action name="If">
<desktop>current</desktop>
<then>
<action name="SendToDesktop">
<to>last</to>
<follow>no</follow>
</action>
</then>
<else>
<action name="If">
<desktop>last</desktop>
<then>
<action name="SendToDesktop">
<to>current</to>
<follow>no</follow>
</action>
</then>
</action>
</else>
</action>
</then>
</action>
</item>
(yay nested tags), but as it turns out, I never thought to add "last"
as a possible condition for the if/foreach desktop tag. The above
should work in the next release though :).
--
Mikael Magnusson
More information about the openbox
mailing list