feat: add Shade/Unshade/ToggleShade actions

This builds on the work of @Consolatis in #1018.

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
Consolatis 2023-08-08 03:39:35 +02:00 committed by Johan Malm
parent 722a802de0
commit e05bedb140
19 changed files with 218 additions and 47 deletions

View file

@ -229,6 +229,15 @@ Actions are used in menus and keyboard/mouse bindings.
Use the automatic placement policy to move the active window to a
position on its output that will minimize overlap with other windows.
*<action name="Shade" />*++
*<action name="Unshade" />*++
*<action name="ToggleShade" />*
Set, unset, or toggle, respectively, the "shaded" state of the active
window. When shaded, window contents are hidden, leaving only the
titlebar visible. Full-screen windows or those without server-side
decorations (including those for which the server-side titlebar has been
hidden) are not eligible for shading.
*<action name="None" />*
If used as the only action for a binding: clear an earlier defined
binding.

View file

@ -12,6 +12,9 @@
<item label="Fullscreen">
<action name="ToggleFullscreen" />
</item>
<item label="Roll up/down">
<action name="ToggleShade" />
</item>
<item label="Decorations">
<action name="ToggleDecorations" />
</item>

View file

@ -331,6 +331,14 @@
<action name="Focus" />
<action name="Raise" />
</mousebind>
<mousebind direction="Up" action="Scroll">
<action name="Unshade" />
<action name="Focus" />
</mousebind>
<mousebind direction="Down" action="Scroll">
<action name="Unfocus" />
<action name="Shade" />
</mousebind>
</context>
<context name="Title">