From a9b7751e9cf51ca73c276f812cee37a983ce3c5f Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Thu, 30 Sep 2021 08:26:18 -0500 Subject: [PATCH] kbd and mon bright --- config.def.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/config.def.h b/config.def.h index a302b1f..6a3e593 100644 --- a/config.def.h +++ b/config.def.h @@ -1,10 +1,16 @@ /* See LICENSE file for copyright and license details. */ #include -//volume +/*volume*/ static const char *upvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%", NULL }; static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%", NULL }; static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute", "0", "toggle", NULL }; +/*Keyboard backlight*/ +static const char *kbdbrightup[] = { "brightnessctl", "-d", "smc::kbd_backlight", "s", "+10%" }; +static const char *kbdbrightdown[] = { "brightnessctl", "-d", "smc::kbd_backlight", "s", "10%-" }; +/*Screen backlight*/ +static const char *brightup[] = { "brightnessctl", "-d", "intel_backlight", "s", "+5%" }; +static const char *brightdown[] = { "brightnessctl", "-d", "intel_backlight", "s", "5%-" }; /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ @@ -12,8 +18,8 @@ static const unsigned int gappx = 5; /* gaps between windows */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "monospace:size=10" }; -static const char dmenufont[] = "monospace:size=10"; +static const char *fonts[] = { "monospace:size=14" }; +static const char dmenufont[] = "monospace:size=14"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; @@ -108,6 +114,10 @@ static Key keys[] = { { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, + { 0, XF86XK_KbdBrightnessUp, spawn, {.v = kbdbrightup } }, + { 0, XF86XK_KbdBrightnessDown,spawn, {.v = kbdbrightdown } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightup } }, + { 0, XF86XK_MonBrightnessDown,spawn, {.v = brightdown } }, }; /* button definitions */