diff --git a/install.sh b/install.sh index f5571fc1..c7f09996 100755 --- a/install.sh +++ b/install.sh @@ -369,7 +369,6 @@ open_link() { echo "Updating Debian..." sudo apt install nala -y -sudo nala update sudo nala upgrade echo echo "##########################" diff --git a/suckless/dwm/config.def.h b/suckless/dwm/config.def.h index 67ed2925..f5252785 100644 --- a/suckless/dwm/config.def.h +++ b/suckless/dwm/config.def.h @@ -1,6 +1,7 @@ /* See LICENSE file for copyright and license details. */ #include "exitdwm.c" +#include /* Allow using F# keys for keybinds */ /* appearance */ static const unsigned int borderpx = 4; /* border pixel of windows */ @@ -58,6 +59,11 @@ static const Layout layouts[] = { /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } +/* volume commands */ +static const char *upvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL }; +static const char *downvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL }; +static const char *mutevol[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL }; + /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; @@ -65,6 +71,11 @@ static const char *termcmd[] = { "st", NULL }; static const char *slockcmd[] = { "slock", NULL }; static const Key keys[] = { + /* Volume keys support */ + { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, + { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, + /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, diff --git a/suckless/dwm/config.h b/suckless/dwm/config.h index 67ed2925..f5252785 100644 --- a/suckless/dwm/config.h +++ b/suckless/dwm/config.h @@ -1,6 +1,7 @@ /* See LICENSE file for copyright and license details. */ #include "exitdwm.c" +#include /* Allow using F# keys for keybinds */ /* appearance */ static const unsigned int borderpx = 4; /* border pixel of windows */ @@ -58,6 +59,11 @@ static const Layout layouts[] = { /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } +/* volume commands */ +static const char *upvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL }; +static const char *downvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL }; +static const char *mutevol[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL }; + /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; @@ -65,6 +71,11 @@ static const char *termcmd[] = { "st", NULL }; static const char *slockcmd[] = { "slock", NULL }; static const Key keys[] = { + /* Volume keys support */ + { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, + { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, + /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },