Add brightness and volume keys
This commit is contained in:
11
config.h
11
config.h
@@ -1,4 +1,5 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
static const char *fonts[] = {
|
||||
@@ -51,6 +52,11 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
|
||||
static const char *termcmd[] = { "urxvt", NULL };
|
||||
static const char *lockcmd[] = { "physlock", "-m", NULL };
|
||||
static const char *scrot[] = { "scrot", "/home/alex/Pictures/Screenshots/%Y-%m-%d-%H%M%S_$wx$h.png", NULL };
|
||||
static const char *brightnessup[] = { "xbacklight", "+1", NULL };
|
||||
static const char *brightnessdown[] = { "xbacklight", "-1", NULL };
|
||||
static const char *voldown[] = { "amixer", "sset", "'Master'", "3%-", "-q", NULL };
|
||||
static const char *volup[] = { "amixer", "sset", "'Master'", "3%+", "-q", NULL };
|
||||
static const char *togglemute[] = { "amixer", "sset", "'Master'", "toggle", "-q", NULL };
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
@@ -91,6 +97,11 @@ static Key keys[] = {
|
||||
{ MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||
{ 0, XK_Print, spawn, {.v = scrot } },
|
||||
{ ShiftMask, XK_Print, spawn, SHCMD("sleep 0.2; scrot -s '/home/alex/Pictures/Screenshots/%Y-%m-%d-%H%M%S_$wx$h.png'") },
|
||||
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup } },
|
||||
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = togglemute } },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
|
||||
Reference in New Issue
Block a user