Add backlight

This commit is contained in:
BitHeaven 2023-07-23 11:11:36 +05:00
parent 991f5e18e3
commit 0beada4a73
4 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,9 @@ static const char *volup[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
static const char *backlightup[] = { "light", "-A", "10", NULL };
static const char *backlightdown[] = { "light", "-U", "10", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
@ -125,6 +128,8 @@ static const Key keys[] = {
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = backlightup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = backlightdown } },
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },

View File

@ -113,6 +113,9 @@ static const char *volup[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
static const char *backlightup[] = { "light", "-A", "10", NULL };
static const char *backlightdown[] = { "light", "-U", "10", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
@ -125,6 +128,8 @@ static const Key keys[] = {
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = backlightup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = backlightdown } },
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },

BIN
dwm

Binary file not shown.

BIN
dwm.o

Binary file not shown.