action: support {Go,Send}ToDesktop 'wrap' option

Make wrap 'true' by default for both GoToDesktop and SendToDesktop,
in order to default to the current behaviour, and to stay consistent
with Openbox behaviour.
This commit is contained in:
Tomi Ollila 2023-05-14 20:44:59 +03:00 committed by Consolatis
parent 44645d06c2
commit f2c3f83041
5 changed files with 42 additions and 18 deletions

View file

@ -91,14 +91,17 @@ Actions are used in menus and keyboard/mouse bindings.
to the center of the window. If the given output does not contain
any windows, the cursor is centered on the given output.
*<action name="GoToDesktop" to="value" />*
*<action name="GoToDesktop" to="value" wrap="yes" />*
Switch to workspace.
*to* The workspace to switch to. Supported values are "last", "left",
"right" or the full name of a workspace or its index (starting at 1)
as configured in rc.xml.
*<action name="SendToDesktop" to="value" follow="yes" />*
*wrap* [yes|no] Wrap around from last desktop to first, and vice
versa. Default yes.
*<action name="SendToDesktop" to="value" follow="yes" wrap="yes" />*
Send active window to workspace.
*to* The workspace to send the window to. Supported values are the same
@ -106,6 +109,9 @@ Actions are used in menus and keyboard/mouse bindings.
*follow* [yes|no] Also switch to the specified workspace. Default yes.
*wrap* [yes|no] Wrap around from last desktop to first, and vice
versa. Default yes.
*<action name="None">*
If used as the only action for a binding: clear an earlier defined binding.

View file

@ -340,10 +340,10 @@
<action name="ShowMenu" menu="root-menu" />
</mousebind>
<mousebind direction="Up" action="Scroll">
<action name="GoToDesktop" to="left" />
<action name="GoToDesktop" to="left" wrap="yes" />
</mousebind>
<mousebind direction="Down" action="Scroll">
<action name="GoToDesktop" to="right" />
<action name="GoToDesktop" to="right" wrap="yes" />
</mousebind>
</context>