diff --git a/.config/i3/blocks b/.config/i3/blocks index 5b69142..1fed681 100644 --- a/.config/i3/blocks +++ b/.config/i3/blocks @@ -43,7 +43,6 @@ interval=1 signal=10 [brightness] -label= command=$HOME/.config/i3/scripts/brightness.sh interval=1 diff --git a/.config/i3/scripts/brightness.sh b/.config/i3/scripts/brightness.sh index beb6f7d..e0a9080 100755 --- a/.config/i3/scripts/brightness.sh +++ b/.config/i3/scripts/brightness.sh @@ -11,4 +11,14 @@ case $BLOCK_BUTTON in 5) xbacklight -dec 10 ;; esac -printf "%.0f" "$(xbacklight -get)" +percentage=$(printf "%.0f" "$(xbacklight)") + +if (( $percentage >= 75 )); then + icon="" +elif (( $percentage >= 25 )); then + icon="" +else + icon="" +fi + +echo $icon $percentage%