config: support audio and monitor keys by default

Add default keybinds:

    XF86_AudioLowerVolume - amixer sset Master 5%-
    XF86_AudioRaiseVolume - amixer sset Master 5%+
    XF86_AudioMute - amixer sset Master toggle
    XF86_MonBrightnessUp - brightnessctl set +10%
    XF86_MonBrightnessDown - brightnessctl set 10%-
This commit is contained in:
Johan Malm 2021-10-14 19:37:57 +01:00
parent 5325fca4b4
commit 417763e8f8
3 changed files with 36 additions and 11 deletions

View file

@ -98,17 +98,22 @@ Click on the background to launch a menu.
If you have not created an rc.xml config file, default binds will be: If you have not created an rc.xml config file, default binds will be:
| combination | action | combination | action
| ------------------- | ------ | ------------------------ | ------
| `alt`-`tab` | activate next window | `alt`-`tab` | activate next window
| `alt`-`escape` | exit | `alt`-`escape` | exit
| `super`-`return` | alacritty | `super`-`return` | alacritty
| `alt`-`F3` | bemenu | `alt`-`F3` | bemenu
| `alt`-`F4` | close window | `alt`-`F4` | close window
| `super`-`a` | toggle maximize | `super`-`a` | toggle maximize
| `alt`-`mouse-left` | move window | `alt`-`mouse-left` | move window
| `alt`-`mouse-right` | resize window | `alt`-`mouse-right` | resize window
| `alt`-`arrow` | move window to edge | `alt`-`arrow` | move window to edge
| `XF86_AudioLowerVolume` | amixer sset Master 5%-
| `XF86_AudioRaiseVolume` | amixer sset Master 5%+
| `XF86_AudioMute` | amixer sset Master toggle
| `XF86_MonBrightnessUp` | brightnessctl set +10%
| `XF86_MonBrightnessDown` | brightnessctl set 10%-
## 6. Integrate ## 6. Integrate

View file

@ -69,6 +69,21 @@
<keybind key="A-Down"> <keybind key="A-Down">
<action name="MoveToEdge"><direction>down</direction></action> <action name="MoveToEdge"><direction>down</direction></action>
</keybind> </keybind>
<keybind key="XF86_AudioLowerVolume">
<action name="Execute"><command>amixer sset Master 5%-</command></action>
</keybind>
<keybind key="XF86_AudioRaiseVolume">
<action name="Execute"><command>amixer sset Master 5%+</command></action>
</keybind>
<keybind key="XF86_AudioMute">
<action name="Execute"><command>amixer sset Master toggle</command></action>
</keybind>
<keybind key="XF86_MonBrightnessUp">
<action name="Execute"><command>brightnessctl set +10%</command></action>
</keybind>
<keybind key="XF86_MonBrightnessDown">
<action name="Execute"><command>brightnessctl set 10%-</command></action>
</keybind>
</keyboard> </keyboard>
<mouse> <mouse>

View file

@ -383,6 +383,11 @@ static struct {
{ "A-Right", "MoveToEdge", "right" }, { "A-Right", "MoveToEdge", "right" },
{ "A-Up", "MoveToEdge", "up" }, { "A-Up", "MoveToEdge", "up" },
{ "A-Down", "MoveToEdge", "down" }, { "A-Down", "MoveToEdge", "down" },
{ "XF86_AudioLowerVolume", "Execute", "amixer sset Master 5%-" },
{ "XF86_AudioRaiseVolume", "Execute", "amixer sset Master 5%+" },
{ "XF86_AudioMute", "Execute", "amixer sset Master toggle" },
{ "XF86_MonBrightnessUp", "Execute", "brightnessctl set +10%" },
{ "XF86_MonBrightnessDown", "Execute", "brightnessctl set 10%-" },
{ NULL, NULL, NULL }, { NULL, NULL, NULL },
}; };