squash! [wip] Add ToggleShade

Add default mouse bindings, document actions
This commit is contained in:
Andrew J. Hesford 2024-01-15 11:08:50 -05:00
parent 2dfb8f6fb2
commit fc5b3788ba
3 changed files with 21 additions and 0 deletions

View file

@ -226,6 +226,15 @@ Actions are used in menus and keyboard/mouse bindings.
Use the automatic placement policy to move the active window to a Use the automatic placement policy to move the active window to a
position on its output that will minimize overlap with other windows. 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" />* *<action name="None" />*
If used as the only action for a binding: clear an earlier defined binding. If used as the only action for a binding: clear an earlier defined binding.

View file

@ -312,6 +312,14 @@
<action name="Focus" /> <action name="Focus" />
<action name="Raise" /> <action name="Raise" />
</mousebind> </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>
<context name="Title"> <context name="Title">

View file

@ -1162,6 +1162,10 @@ static struct mouse_combos {
{ "Frame", "A-Right", "Drag", "Resize", NULL, NULL}, { "Frame", "A-Right", "Drag", "Resize", NULL, NULL},
{ "Titlebar", "Left", "Press", "Focus", NULL, NULL}, { "Titlebar", "Left", "Press", "Focus", NULL, NULL},
{ "Titlebar", "Left", "Press", "Raise", NULL, NULL}, { "Titlebar", "Left", "Press", "Raise", NULL, NULL},
{ "Titlebar", "Up", "Scroll", "Unfocus", NULL, NULL},
{ "Titlebar", "Up", "Scroll", "Shade", NULL, NULL},
{ "Titlebar", "Down", "Scroll", "Unshade", NULL, NULL},
{ "Titlebar", "Down", "Scroll", "Focus", NULL, NULL},
{ "Title", "Left", "Drag", "Move", NULL, NULL }, { "Title", "Left", "Drag", "Move", NULL, NULL },
{ "Title", "Left", "DoubleClick", "ToggleMaximize", NULL, NULL }, { "Title", "Left", "DoubleClick", "ToggleMaximize", NULL, NULL },
{ "TitleBar", "Right", "Click", "Focus", NULL, NULL}, { "TitleBar", "Right", "Click", "Focus", NULL, NULL},