diff --git a/config.h b/config.h index c5ca55d..3eaf16d 100644 --- a/config.h +++ b/config.h @@ -59,7 +59,12 @@ static const Layout layouts[] = { static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL }; static const char *termcmd[] = { "st", NULL }; -static const char *quit_dwm[] = { "pkill", "xinit", NULL }; +static const char *quit_dwm[] = { "pkill", "X", NULL }; +static const char *vol_up[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%+", NULL }; +static const char *vol_down[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%-", NULL }; +static const char *brighter[] = { "brightnessctl", "set", "10%+", NULL }; +static const char *dimmer[] = { "brightnessctl", "set", "10%-", NULL }; +static const char *vol_mute[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL }; /* * Xresources preferences to load at startup @@ -79,7 +84,7 @@ ResourcePref resources[] = { { "resizehints", INTEGER, &resizehints }, { "mfact", FLOAT, &mfact }, }; - +#include static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, @@ -116,6 +121,11 @@ static Key keys[] = { TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_r, quit, {0} }, { MODKEY|ShiftMask, XK_q, spawn, {.v = quit_dwm} }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brighter } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = dimmer } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } }, + { 0, XF86XK_AudioMute, spawn, {.v = vol_mute } }, }; /* button definitions */ diff --git a/dwm b/dwm index 7693b18..f07538c 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.o b/dwm.o index ebd97fe..5f95ce8 100644 Binary files a/dwm.o and b/dwm.o differ