]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: support audio and monitor keys by default
authorJohan Malm <jgm323@gmail.com>
Thu, 14 Oct 2021 18:37:57 +0000 (19:37 +0100)
committerJohan Malm <jgm323@gmail.com>
Thu, 14 Oct 2021 18:37:57 +0000 (19:37 +0100)
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%-

README.md
docs/rc.xml.all
src/config/rcxml.c

index c5d221014e3e6be4dd392b805e8b05d3110dbf73..8077b7ca46a58f96bfeb26ea2d24ce2f228ddae5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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:
 
-| combination         | action
-| ------------------- | ------
-| `alt`-`tab`         | activate next window
-| `alt`-`escape`      | exit
-| `super`-`return`    | alacritty
-| `alt`-`F3`          | bemenu
-| `alt`-`F4`          | close window
-| `super`-`a`         | toggle maximize
-| `alt`-`mouse-left`  | move window
-| `alt`-`mouse-right` | resize window
-| `alt`-`arrow`       | move window to edge
+| combination              | action
+| ------------------------ | ------
+| `alt`-`tab`              | activate next window
+| `alt`-`escape`           | exit
+| `super`-`return`         | alacritty
+| `alt`-`F3`               | bemenu
+| `alt`-`F4`               | close window
+| `super`-`a`              | toggle maximize
+| `alt`-`mouse-left`       | move window
+| `alt`-`mouse-right`      | resize window
+| `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
 
index a9af326f2826600660899343282f1f5fd6e7d889..3cc653513a838cd0cf5cbb3b1b5b672e3b94d2c8 100644 (file)
     <keybind key="A-Down">
       <action name="MoveToEdge"><direction>down</direction></action>
     </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>
 
   <mouse>
index 3b31863219764549c715ed532e692f64eb35d0a5..29dbb79bce4d6a733bc2648a8152425ad88e155c 100644 (file)
@@ -383,6 +383,11 @@ static struct {
        { "A-Right", "MoveToEdge", "right" },
        { "A-Up", "MoveToEdge", "up" },
        { "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 },
 };