From d0f27ceb74a3ad18d9e77f23eefce78ab6d91953 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:55:27 +0300 Subject: [PATCH] update config.def.h --- config/dwm/config.def.h | 8 +++++++- config/dwm/scripts/bar.sh | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config/dwm/config.def.h b/config/dwm/config.def.h index b9c61ed1..8647501b 100644 --- a/config/dwm/config.def.h +++ b/config/dwm/config.def.h @@ -93,6 +93,9 @@ static const char *termcmd[] = { "kitty", NULL }; static const char *upvol[] = { "pactl", "set-sink-volume", "0", "+5%", NULL }; static const char *downvol[] = { "pactl", "set-sink-volume", "0", "-5%", NULL }; static const char *mutevol[] = { "pactl", "set-sink-mute", "0", "toggle", NULL }; +// brightness +static const char *brightnessup[] = { "brightnessctl", "s", "+100", NULL }; +static const char *brightnessdown[] = { "brightnessctl", "s", "-100", NULL }; static const Key keys[] = { /* modifier key function argument */ @@ -142,12 +145,15 @@ static const Key keys[] = { { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, + // brightness + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup} }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown} }, 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_6, 5) // TAGKEYS( XK_7, 6) // TAGKEYS( XK_8, 7) // TAGKEYS( XK_9, 8) diff --git a/config/dwm/scripts/bar.sh b/config/dwm/scripts/bar.sh index 0363bf05..192fe063 100755 --- a/config/dwm/scripts/bar.sh +++ b/config/dwm/scripts/bar.sh @@ -11,7 +11,7 @@ interval=0 cpu() { cpu_val=$(grep -o "^[^ ]*" /proc/loadavg) - printf "^c$black^ ^b$red^ CPU" + printf "^c$white^ ^b$red^ CPU" printf "^c$white^ ^b$grey^ $cpu_val" } @@ -34,9 +34,9 @@ battery() { audio() { get_vol=$(pamixer --get-volume-human) if [ $get_vol = 'muted' ]; then - printf "^c$blue^ 󰕾 Muted" + printf "^c$white^  Muted" else - printf "^c$blue^ 󰕾 $get_vol" + printf "^c$blue^  $get_vol" fi #printf "^c$blue^ 󰕾 $get_vol" }