From 4e31caf4d61b7eb3a052d50c25b21daddb9f0d81 Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Fri, 16 Jan 2026 11:47:35 +0100 Subject: feat(dwm): add mute keybind --- dwm/config.def.h | 2 ++ dwm/config.h | 2 ++ laptop.diff | 10 ++++++---- slstatus/config.def.h | 2 +- slstatus/config.h | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dwm/config.def.h b/dwm/config.def.h index 107803c..2ffd60a 100644 --- a/dwm/config.def.h +++ b/dwm/config.def.h @@ -89,6 +89,7 @@ static const char *previouscmd[] = {"adb", "shell", "input", "keyevent", "88", N 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", "65", NULL}; +static const char *volumemute[] = {"pulsemixer", "--toggle-mute", NULL}; static const char *emojicmd[] = {"simplemoji", "-szxpt", "dark", "-m", "#e0def4", "--background-color", "#1e1e2e"}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", @@ -138,6 +139,7 @@ static const Key keys[] = { {MODKEY | ShiftMask, XK_o, spawn, {.v = volumeup}}, {MODKEY | ShiftMask, XK_l, spawn, {.v = volumedown}}, {MODKEY | ShiftMask, XK_r, spawn, {.v = volumereset}}, + {MODKEY | ShiftMask, XK_m, spawn, {.v = volumemute}}, }; /* button definitions */ diff --git a/dwm/config.h b/dwm/config.h index 107803c..2ffd60a 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -89,6 +89,7 @@ static const char *previouscmd[] = {"adb", "shell", "input", "keyevent", "88", N 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", "65", NULL}; +static const char *volumemute[] = {"pulsemixer", "--toggle-mute", NULL}; static const char *emojicmd[] = {"simplemoji", "-szxpt", "dark", "-m", "#e0def4", "--background-color", "#1e1e2e"}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", @@ -138,6 +139,7 @@ static const Key keys[] = { {MODKEY | ShiftMask, XK_o, spawn, {.v = volumeup}}, {MODKEY | ShiftMask, XK_l, spawn, {.v = volumedown}}, {MODKEY | ShiftMask, XK_r, spawn, {.v = volumereset}}, + {MODKEY | ShiftMask, XK_m, spawn, {.v = volumemute}}, }; /* button definitions */ diff --git a/laptop.diff b/laptop.diff index be7e6fb..b5c6f56 100644 --- a/laptop.diff +++ b/laptop.diff @@ -36,12 +36,13 @@ index 107803c..8d0e574 100644 static const char *firefoxcmd[] = {"firefox", NULL}; static const char *discordcmd[] = {"discord", NULL}; static const char *adbscreencmd[] = {"screenshot", NULL}; -@@ -88,7 +88,7 @@ static const char *nextcmd[] = {"adb", "shell", "input", "keyevent", "87", NULL} +@@ -88,8 +88,8 @@ 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", "65", NULL}; +static const char *volumereset[] = {"pulsemixer", "--set-volume", "55", NULL}; + static const char *volumemute[] = {"pulsemixer", "--toggle-mute", NULL}; static const char *emojicmd[] = {"simplemoji", "-szxpt", "dark", "-m", "#e0def4", "--background-color", "#1e1e2e"}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", @@ -83,12 +84,13 @@ index 107803c..8d0e574 100644 static const char *firefoxcmd[] = {"firefox", NULL}; static const char *discordcmd[] = {"discord", NULL}; static const char *adbscreencmd[] = {"screenshot", NULL}; -@@ -88,7 +88,7 @@ static const char *nextcmd[] = {"adb", "shell", "input", "keyevent", "87", NULL} +@@ -88,8 +88,8 @@ 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", "65", NULL}; +static const char *volumereset[] = {"pulsemixer", "--set-volume", "55", NULL}; + static const char *volumemute[] = {"pulsemixer", "--toggle-mute", NULL}; static const char *emojicmd[] = {"simplemoji", "-szxpt", "dark", "-m", "#e0def4", "--background-color", "#1e1e2e"}; static const char *qalccmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", @@ -98,7 +100,7 @@ index 7052e30..bf04447 100644 +++ b/slstatus/config.def.h @@ -69,5 +69,7 @@ static const struct arg args[] = { {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s%% ", "pulsemixer --get-volume | awk '{print $2 }'"}, + {run_command, "%s ", "audio"}, {keymap, "%s ", NULL}, + {wifi_essid, "%s ", "wlan0"}, + {battery_perc, "%s%% ", "BAT0"}, @@ -110,7 +112,7 @@ index 7052e30..bf04447 100644 +++ b/slstatus/config.h @@ -69,5 +69,7 @@ static const struct arg args[] = { {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s%% ", "pulsemixer --get-volume | awk '{print $2 }'"}, + {run_command, "%s ", "audio"}, {keymap, "%s ", NULL}, + {wifi_essid, "%s ", "wlan0"}, + {battery_perc, "%s%% ", "BAT0"}, diff --git a/slstatus/config.def.h b/slstatus/config.def.h index 7052e30..cfad904 100644 --- a/slstatus/config.def.h +++ b/slstatus/config.def.h @@ -67,7 +67,7 @@ static const char unknown_str[] = "n/a"; static const struct arg args[] = { /* function format argument */ {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s%% ", "pulsemixer --get-volume | awk '{print $2 }'"}, + {run_command, "%s ", "audio"}, {keymap, "%s ", NULL}, {datetime, "%s ", "%H:%M:%S"}, }; diff --git a/slstatus/config.h b/slstatus/config.h index 7052e30..cfad904 100644 --- a/slstatus/config.h +++ b/slstatus/config.h @@ -67,7 +67,7 @@ static const char unknown_str[] = "n/a"; static const struct arg args[] = { /* function format argument */ {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s%% ", "pulsemixer --get-volume | awk '{print $2 }'"}, + {run_command, "%s ", "audio"}, {keymap, "%s ", NULL}, {datetime, "%s ", "%H:%M:%S"}, }; -- cgit v1.2.3