add audio and brightness keybinds
This commit is contained in:
parent
a8c68fab70
commit
c29331e9f2
3 changed files with 12 additions and 2 deletions
14
config.h
14
config.h
|
|
@ -59,7 +59,12 @@ static const Layout layouts[] = {
|
||||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *termcmd[] = { "st", NULL };
|
||||||
static const char *quit_dwm[] = { "pkill", "xinit", NULL };
|
static const char *quit_dwm[] = { "pkill", "X", NULL };
|
||||||
|
static const char *vol_up[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
|
||||||
|
static const char *vol_down[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
|
||||||
|
static const char *brighter[] = { "brightnessctl", "set", "10%+", NULL };
|
||||||
|
static const char *dimmer[] = { "brightnessctl", "set", "10%-", NULL };
|
||||||
|
static const char *vol_mute[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Xresources preferences to load at startup
|
* Xresources preferences to load at startup
|
||||||
|
|
@ -79,7 +84,7 @@ ResourcePref resources[] = {
|
||||||
{ "resizehints", INTEGER, &resizehints },
|
{ "resizehints", INTEGER, &resizehints },
|
||||||
{ "mfact", FLOAT, &mfact },
|
{ "mfact", FLOAT, &mfact },
|
||||||
};
|
};
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
static Key keys[] = {
|
static Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
|
|
@ -116,6 +121,11 @@ static Key keys[] = {
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
{ MODKEY|ShiftMask, XK_r, quit, {0} },
|
{ MODKEY|ShiftMask, XK_r, quit, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_q, spawn, {.v = quit_dwm} },
|
{ MODKEY|ShiftMask, XK_q, spawn, {.v = quit_dwm} },
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brighter } },
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = dimmer } },
|
||||||
|
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } },
|
||||||
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
|
||||||
|
{ 0, XF86XK_AudioMute, spawn, {.v = vol_mute } },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
|
|
|
||||||
BIN
dwm
BIN
dwm
Binary file not shown.
BIN
dwm.o
BIN
dwm.o
Binary file not shown.
Loading…
Reference in a new issue