[openbox] Move all windows to other desktop – reopened

Martin Jiřička mjiricka at gmail.com
Mon Feb 13 11:45:52 EST 2017


Hello!

I would like to move all windows to another desktop in the same way as
I can move one window with SendToDesktop. Which means this bind

    <keybind key="W-C-l">
        <action name="SendToDesktop"><to>right</to></action>
    </keybind>

allows me to select a window, press Win+Ctrl key a then press twice
key "L" to send the window to workspace that is two columns right from
the starting workspace.

There were already a question about this and also proposed solution:

http://icculus.org/pipermail/openbox/2015-September/008939.html

So I tried something like this:

    <keybind  key="W-C-S-l">
        <action  name="ForEach">
            <omnipresent>no</omnipresent>
            <then>
                <action  name="If">
                    <desktop>current</desktop>
                    <then>
                        <action  name="SendToDesktop">
                            <to>right</to>
                            <follow>no</follow>
                        </action>
                    </then>
                </action>
            </then>
        </action>
    </keybind>

Problem is that it cannot be used the same way as SendToDesktop,
because it must be used "in two steps" (send all windows to right,
switch to right desktop, send all windows to right), which "picks up"
also all windows that are between source and destination workspace.

I remember Mate or Xfce (or both, I am not sure) used to have
MoveDesktop action that worked as I want, i.e. as SendToDesktop with a
single window.

Is there any other way how to achieve desired functionality?


Best wishes
Martin


More information about the openbox mailing list