feat(dwm): more controls
This commit is contained in:
parent
adea9b916e
commit
aee809669d
1 changed files with 77 additions and 68 deletions
|
@ -1,5 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
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 *termcmd[] = { "alacritty", NULL };
|
||||||
static const char *locksaver[] = { "i3lock", "-c", "#000000", NULL };
|
static const char *locksaver[] = { "i3lock", "-c", "#000000", NULL };
|
||||||
|
|
||||||
static const char *volup[] = { "amixer", "set", "Master", "5%+", NULL };
|
static const char *vol_up[] = { "amixer", "set", "Master", "5%+", NULL };
|
||||||
static const char *voldown[] = { "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[] = {
|
static Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
@ -95,8 +101,11 @@ static Key keys[] = {
|
||||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
{ MODKEY, XK_Up, spawn, {.v = volup } },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
|
||||||
{ MODKEY, XK_Down, spawn, {.v = voldown } },
|
{ 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_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_3, 2)
|
||||||
|
|
Loading…
Reference in a new issue