Browse Source

brightness control using xbacklight

dwm6.4
Ivan Polyakov 2 years ago
parent
commit
ff89890784
  1. 4
      README.md
  2. 82
      config.def.h

4
README.md

@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
dwm
===
Vilor's dwm based on [dwm 6.4](README.dwm.md)
Used patches
------------
* systray

82
config.def.h

@ -94,46 +94,52 @@ static const char *togglevolcmd[] = @@ -94,46 +94,52 @@ static const char *togglevolcmd[] =
/* toggle microphone */
static const char *togglemiccmd[] =
{ "/usr/bin/amixer", "set", "Capture", "toggle", NULL };
/* brightness up */
static const char *brightness_up[] = { "xbacklight", "-inc", "10", NULL };
/* brightness down */
static const char *brightness_down[] = { "xbacklight", "-dec", "10", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = upvolcmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = downvolcmd } },
{ 0, XF86XK_AudioMute, spawn, { .v = togglevolcmd } },
{ 0, XF86XK_AudioMicMute, spawn, { .v = togglemiccmd } },
{ MODKEY, XK_p, spawn, {.v = roficmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
/* modifier key function argument */
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = upvolcmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = downvolcmd } },
{ 0, XF86XK_AudioMute, spawn, { .v = togglevolcmd } },
{ 0, XF86XK_AudioMicMute, spawn, { .v = togglemiccmd } },
{ 0, XF86XK_MonBrightnessUp, spawn, { .v = brightness_up } },
{ 0, XF86XK_MonBrightnessDown, spawn, { .v = brightness_down } },
{ MODKEY, XK_p, spawn, {.v = roficmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */

Loading…
Cancel
Save