diff --git a/config.def.h b/config.def.h index 6e87351..41abbba 100644 --- a/config.def.h +++ b/config.def.h @@ -33,8 +33,8 @@ static const Rule rules[] = { * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ - { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, + { "Gimp", NULL, NULL, 0, 1, -1 }, + { "Iceweasel", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ @@ -66,6 +66,21 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +/* volume controls */ +static const char *upvol[] = { "amixer", "-q", "set", "Master", "5%+", "unmute", NULL }; +static const char *downvol[] = { "amixer", "-q", "set", "Master", "5%-", "unmute", NULL }; +static const char *mutevol[] = { "amixer", "-q", "set", "Master", "toggle", NULL }; + +/* brightnes */ +static const char *brightdowncmd[] = { "xbacklight","-dec", "5", NULL }; +static const char *brightupcmd[] = { "xbacklight","-inc", "5", NULL }; + +/* lock screen */ +static const char *lockcmd[] = { "slock", NULL }; + +/* screenshot */ +static const char *capturecmd[] = { "scrot","-s", NULL }; + static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, @@ -94,6 +109,13 @@ static Key keys[] = { { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, + { MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } }, + { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightdowncmd } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightupcmd } }, + { 0, XK_Print, spawn, {.v = capturecmd } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/dwm.c b/dwm.c index 0d70f45..2af5270 100644 --- a/dwm.c +++ b/dwm.c @@ -40,6 +40,7 @@ #include #endif /* XINERAMA */ #include +#include #include "drw.h" #include "util.h"