diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2026-01-16 11:47:35 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2026-01-16 11:47:35 +0100 |
| commit | 4e31caf4d61b7eb3a052d50c25b21daddb9f0d81 (patch) | |
| tree | f6206c77a7d662db920639975cc021b4de0440bc | |
| parent | feat: replace install script with Makefile (diff) | |
| download | suckless-setup-4e31caf4d61b7eb3a052d50c25b21daddb9f0d81.tar.gz | |
feat(dwm): add mute keybind
| -rw-r--r-- | dwm/config.def.h | 2 | ||||
| -rw-r--r-- | dwm/config.h | 2 | ||||
| -rw-r--r-- | laptop.diff | 10 | ||||
| -rw-r--r-- | slstatus/config.def.h | 2 | ||||
| -rw-r--r-- | 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"}, }; |
