diff --git a/config.h b/config.h index abbd557..aa2043e 100644 --- a/config.h +++ b/config.h @@ -2,7 +2,7 @@ #include /* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ @@ -115,6 +115,15 @@ static const char *termcmd[] = { "alacritty", NULL }; static const char *ffcmd[] = { "firefox", NULL }; static const char *roficmd[] = { "rofi", "-show", "drun", NULL }; +static const char *volupcmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL }; +static const char *voldowncmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL }; +static const char *volmutecmd[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL }; +static const char *mediaplaycmd[] = { "playerctl", "play-pause", NULL }; +static const char *medianextcmd[] = { "playerctl", "next", NULL }; +static const char *mediaprevcmd[] = { "playerctl", "previous", NULL }; +static const char *brightupcmd[] = { "brightnessctl", "set", "+10%", NULL }; +static const char *brightdowncmd[] = { "brightnessctl", "set", "10%-", NULL }; + static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_d, spawn, {.v = roficmd } }, @@ -136,6 +145,16 @@ static const Key keys[] = { { MODKEY|ShiftMask, XK_k, placedir, {.i = 2 } }, { MODKEY|ShiftMask, XK_j, placedir, {.i = 3 } }, + /* xf86 */ + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } }, + { 0, XF86XK_AudioMute, spawn, {.v = volmutecmd } }, + { 0, XF86XK_AudioPlay, spawn, {.v = mediaplaycmd } }, + { 0, XF86XK_AudioNext, spawn, {.v = medianextcmd } }, + { 0, XF86XK_AudioPrev, spawn, {.v = mediaprevcmd } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightupcmd } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightdowncmd } }, + /* cycle layouts */ { MODKEY, XK_n, cyclelayout, {.i = +1 } }, diff --git a/dwm b/dwm index 29787f5..bf2f9f3 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.o b/dwm.o index 1cb4105..25c67d6 100644 Binary files a/dwm.o and b/dwm.o differ