tconfig.h: add amixer and brightness XF86 binds - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit af59425c3db17f9cd8e449bb17b6d5166499cce0
(DIR) parent 4b1db939b79df532625288fa2b6289f2b488e384
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 19 Sep 2025 23:29:19 +0200
config.h: add amixer and brightness XF86 binds
Diffstat:
M config.h | 14 ++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/config.h b/config.h
t@@ -148,6 +148,13 @@ static const char *mpd_remote_stopcmd[] = {"mpc", "stop", "-q", "-h", MPD_RE
static const char *mpdremotevolupcmd[] = {"mpc", "-q", "-h", MPD_REMOTE, "volume", "+10", NULL};
static const char *mpdremotevoldncmd[] = {"mpc", "-q", "-h", MPD_REMOTE, "volume", "-10", NULL};
+static const char *audiovolupcmd[] = {"amixer", "set", "Master", "5%+", NULL};
+static const char *audiovoldncmd[] = {"amixer", "set", "Master", "5%-", NULL};
+static const char *audiomutecmd[] = {"amixer", "set", "Master", "toggle", NULL};
+
+static const char *brightnessupcmd[] = {"brightnessctl", "set", "10%+", NULL};
+static const char *brightnessdncmd[] = {"brightnessctl", "set", "10%-", NULL};
+
static const char *audioextvolupcmd[] = {"sndioctl", "output.level=+0.05", NULL};
static const char *audioextvoldncmd[] = {"sndioctl", "output.level=-0.05", NULL};
static const char *audioextmutecmd[] = {"sndioctl", "output.mute=!", NULL};
t@@ -199,6 +206,10 @@ static Key keys[] = {
{ MODKEY|ShiftMask|ControlMask, XK_Left, spawn, {.v = mouseleftclickcmd } },
{ MODKEY|ShiftMask|ControlMask, XK_Right, spawn, {.v = mouserightclickcmd } },
+ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audiovolupcmd } },
+ { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiovoldncmd } },
+ { 0, XF86XK_AudioMute, spawn, {.v = audiomutecmd } },
+
{ ShiftMask, XF86XK_AudioRaiseVolume, spawn, {.v = audioextvolupcmd } },
{ ShiftMask, XF86XK_AudioLowerVolume, spawn, {.v = audioextvoldncmd } },
{ ShiftMask, XF86XK_AudioMute, spawn, {.v = audioextmutecmd } },
t@@ -206,6 +217,9 @@ static Key keys[] = {
{ ControlMask|ShiftMask, XF86XK_AudioRaiseVolume, spawn, {.v = mpdremotevolupcmd } },
{ ControlMask|ShiftMask, XF86XK_AudioLowerVolume, spawn, {.v = mpdremotevoldncmd } },
+ { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessupcmd } },
+ { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdncmd } },
+
{ MODKEY, XK_F1, spawn, {.v = mancmd } },
{ MODKEY, XK_F7, spawn, {.v = displaycmd } },
{ MODKEY|ShiftMask, XK_F7, spawn, {.v = displayintcmd } },