diff options
| author | pml68 <contact@pml68.dev> | 2025-05-21 00:11:36 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-05-21 00:16:30 +0200 |
| commit | 0aa12c7338a597b247a74627d70f407309dca849 (patch) | |
| tree | 04b3d4f57aa07af397a3e0b9f696b66c5a0e3385 | |
| parent | feat: rename first "extra" tag to "game" (diff) | |
| download | suckless-setup-0aa12c7338a597b247a74627d70f407309dca849.tar.gz | |
feat: add keymaps for volume up/down
| -rw-r--r-- | dwm/config.def.h | 6 | ||||
| -rw-r--r-- | dwm/config.h | 6 |
2 files changed, 12 insertions, 0 deletions
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 */ |
