From 47f4d2afa6100a78e8bb0aaaef789f9e62f7a7ef Mon Sep 17 00:00:00 2001 From: irrlicht Date: Tue, 21 Apr 2026 21:05:30 +0200 Subject: [PATCH] Volume control scripts --- config.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index ba054d9..9af4ab9 100644 --- a/config.h +++ b/config.h @@ -122,9 +122,14 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static const char *termcmd[] = { "foot", NULL }; +static const char *termcmd[] = { "foot", NULL }; static const char *webbrowsercmd[] = { "firefox", NULL }; -static const char *menucmd[] = { "fuzzel", NULL }; +static const char *menucmd[] = { "fuzzel", NULL }; +static const char *volup[] = { "/home/irrlicht/scripts/volume.sh", "up", NULL }; +static const char *voldown[] = { "/home/irrlicht/scripts/volume.sh", "down", NULL }; +static const char *volmute[] = { "/home/irrlicht/scripts/volume.sh", "mute", NULL }; +static const char *brigup[] = { "/home/irrlicht/scripts/brightness.sh", "up", NULL }; +static const char *brigdown[] = { "/home/irrlicht/scripts/brightness.sh", "down", NULL }; static const Key keys[] = { /* Note that Shift changes certain key codes: 2 -> at, etc. */ @@ -161,6 +166,13 @@ static const Key keys[] = { { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_O, tagcyclemon, {.i = WLR_DIRECTION_RIGHT} }, { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} }, + /* media keys */ + { 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volup} }, + { 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = voldown} }, + { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volmute} }, + { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brigup} }, + { 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brigdown} }, + /* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */ { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} }, /* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is