Make the brightness a little bit prettier

This commit is contained in:
Riyyi
2017-12-24 01:28:04 +01:00
parent a1f72d0eb3
commit d3f5ce6d92
2 changed files with 11 additions and 2 deletions
-1
View File
@@ -43,7 +43,6 @@ interval=1
signal=10 signal=10
[brightness] [brightness]
label=
command=$HOME/.config/i3/scripts/brightness.sh command=$HOME/.config/i3/scripts/brightness.sh
interval=1 interval=1
+11 -1
View File
@@ -11,4 +11,14 @@ case $BLOCK_BUTTON in
5) xbacklight -dec 10 ;; 5) xbacklight -dec 10 ;;
esac 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%