[openbox] Move all windows to other desktop

Mathias Dufresne mathias.dufresne at gmail.com
Thu Sep 3 08:34:36 EDT 2015


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.




2015-09-03 9:51 GMT+02:00 Mikael Magnusson <mikachu at gmail.com>:

> On Thu, Sep 3, 2015 at 8:32 AM, Mathias Dufresne
> <mathias.dufresne at gmail.com> wrote:
> > Thank you a lot for that :)
> >
> > 2015-09-02 20:12 GMT+02:00 Dana Jansens <danakj at orodu.net>:
> >>
> >> You can add a desktop in the middle using "current".
> >> http://openbox.org/wiki/Help:Actions#AddDesktop
> >>
> >> On Wed, Sep 2, 2015 at 6:47 AM, Mathias Dufresne
> >> <mathias.dufresne at gmail.com> wrote:
> >>>
> >>> Hi all,
> >>>
> >>> Is it possible, or would it be possible, to move all windows to another
> >>> desktop, keeping windows order, position and size?
> >>>
> >>> This would be very nice on heavy loaded and organized desktops. For
> now a
> >>> new desktop can be added as last desktop.
> >>>
> >>> With 4 desktop, the new one become n°5. If user desire was to have a 2'
> >>> desktop to expand work done on second desktop, all windows from n°4
> have to
> >>> be moved to 5 then all windows from 3 have to be moved to 4.
> >>>
> >>> For that specific case we could simply (perhaps it is not simple to
> code
> >>> it, I have no idea ;) add a commands to:
> >>> - add new desktop between 1 & 2
> >>> - add new desktop between 2 & 3
> >>> etc...
> >>>
> >>> But for the case you opened too much windows on one desktop then decide
> >>> that desktop is not the right one, you have to move them manually...
>
> You can use something like the following.
>
> <action name="ForEach">
>   <desktop>current</desktop>
>   <then>
>     <action name="SendToDesktop">
>       <to>last</to>
>     </action>
>   </then>
> </action>
>
> And it will send all windows on the current desktop to the last
> desktop you were on (make sure 'go to desktop [last]' gets you to
> where you want before you press this binding.) If you send them to a
> desktop that has other windows on it, you'll have to separate them
> manually. There is a slight timeout so that you can use next/previous
> desktop without setting "the last desktop" to any of the intermediate
> ones.
>
> --
> Mikael Magnusson
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20150903/3364bdbd/attachment.html>


More information about the openbox mailing list