feat(dwm): more controls

This commit is contained in:
Didier Slof 2023-02-20 11:48:59 +01:00
parent adea9b916e
commit aee809669d
Signed by: didier
GPG key ID: 01E71F18AA4398E5

View file

@ -1,5 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
@ -66,10 +68,14 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
static const char *termcmd[] = { "alacritty", NULL };
static const char *locksaver[] = { "i3lock", "-c", "#000000", NULL };
static const char *volup[] = { "amixer", "set", "Master", "5%+", NULL };
static const char *voldown[] = { "amixer", "set", "Master", "5%-", NULL };
static const char *vol_up[] = { "amixer", "set", "Master", "5%+", NULL };
static const char *vol_down[] = { "amixer", "set", "Master", "5%-", NULL };
static const char *vol_mute[] = { "amixer", "set", "Master", "toggle", NULL };
static const char *dwmdie[] = { "killall", "dwm-start", NULL };
static const char *light_up[] = {"light", "-A", "5", NULL};
static const char *light_down[] = {"light", "-U", "5", NULL};
static const char *dwmdie[] = {"/bin/sh", "-c", "pkill dwm-start && pkill dwm", "null"};
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
@ -95,8 +101,11 @@ static Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY, XK_Up, spawn, {.v = volup } },
{ MODKEY, XK_Down, spawn, {.v = voldown } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } },
{ 0, XF86XK_AudioMute, spawn, {.v = vol_mute } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = light_up} },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = light_down} },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)