From eb03f485750af488102e1721f75f3e6707a9a6e9 Mon Sep 17 00:00:00 2001 From: Cristian Miranda Date: Sun, 7 Jan 2024 19:07:07 -0300 Subject: [PATCH] :wrench: polybar[brightness]: add brightness control --- home/.config/polybar/config.ini | 8 ++++++-- home/.config/sxhkd/sxhkdrc | 6 ++++++ home/bin/adjust-brightness | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/home/.config/polybar/config.ini b/home/.config/polybar/config.ini index 00d9335f..d16226a5 100644 --- a/home/.config/polybar/config.ini +++ b/home/.config/polybar/config.ini @@ -64,7 +64,7 @@ separator-foreground = ${colors.disabled} modules-left = logo i3 sxhkd-ipc hotkeys-ipc spotify-now-playing modules-center = -modules-right = dolarblue dozer microphone pulseaudio-control-output network cpu-temperature cpu memory weather custom-date trayseparator spotify owl thunderbird github vpn packages dunst trayseparator +modules-right = dolarblue dozer microphone pulseaudio-control-output brightness network cpu-temperature cpu memory weather custom-date trayseparator spotify owl thunderbird github vpn packages dunst trayseparator cursor-click = pointer cursor-scroll = ns-resize @@ -254,6 +254,11 @@ label-empty-padding = 0 type = internal/xwindow label = %title:0:60:...% +[module/brightness] +type = custom/script +interval = 1 +exec = xrandr --verbose | awk '/Brightness/ {print $2 * 100; exit}' | xargs printf "󰃞 %.0f%%" + [module/pulseaudio-control-output] type = custom/script tail = true @@ -469,7 +474,6 @@ exec = .config/polybar/scripts/packages [module/owl] type = custom/script -interval = 5 format =