Volume control scripts

This commit is contained in:
2026-04-21 21:05:30 +02:00
parent 354a047829
commit 47f4d2afa6
+14 -2
View File
@@ -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