From 0aa12c7338a597b247a74627d70f407309dca849 Mon Sep 17 00:00:00 2001 From: pml68 Date: Wed, 21 May 2025 00:11:36 +0200 Subject: feat: add keymaps for volume up/down --- dwm/config.def.h | 6 ++++++ dwm/config.h | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'dwm') diff --git a/dwm/config.def.h b/dwm/config.def.h index 39b592e..f584206 100644 --- a/dwm/config.def.h +++ b/dwm/config.def.h @@ -90,6 +90,9 @@ static const char *nextcmd[] = {"adb", "shell", "input", "keyevent", "87", NULL}; static const char *previouscmd[] = {"adb", "shell", "input", "keyevent", "88", NULL}; +static const char *volumeup[] = {"pulsemixer", "--change-volume", "+5", NULL}; +static const char *volumedown[] = {"pulsemixer", "--change-volume", "-5", NULL}; +static const char *volumereset[] = {"pulsemixer", "--set-volume", "60", NULL}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", @@ -134,6 +137,9 @@ static const Key keys[] = { {MODKEY | ShiftMask, XK_p, spawn, {.v = previouscmd}}, {MODKEY, XK_s, spawn, {.v = adbscreencmd}}, {MODKEY, XK_c, spawn, {.v = qalccmd}}, + {MODKEY | ShiftMask, XK_o, spawn, {.v = volumeup}}, + {MODKEY | ShiftMask, XK_l, spawn, {.v = volumedown}}, + {MODKEY | ShiftMask, XK_r, spawn, {.v = volumereset}}, }; /* button definitions */ diff --git a/dwm/config.h b/dwm/config.h index 39b592e..f584206 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -90,6 +90,9 @@ static const char *nextcmd[] = {"adb", "shell", "input", "keyevent", "87", NULL}; static const char *previouscmd[] = {"adb", "shell", "input", "keyevent", "88", NULL}; +static const char *volumeup[] = {"pulsemixer", "--change-volume", "+5", NULL}; +static const char *volumedown[] = {"pulsemixer", "--change-volume", "-5", NULL}; +static const char *volumereset[] = {"pulsemixer", "--set-volume", "60", NULL}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", @@ -134,6 +137,9 @@ static const Key keys[] = { {MODKEY | ShiftMask, XK_p, spawn, {.v = previouscmd}}, {MODKEY, XK_s, spawn, {.v = adbscreencmd}}, {MODKEY, XK_c, spawn, {.v = qalccmd}}, + {MODKEY | ShiftMask, XK_o, spawn, {.v = volumeup}}, + {MODKEY | ShiftMask, XK_l, spawn, {.v = volumedown}}, + {MODKEY | ShiftMask, XK_r, spawn, {.v = volumereset}}, }; /* button definitions */ -- cgit v1.2.3