This is a collection of dotfiles and scripts for my bspwm setup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
406 B

#!/bin/sh
case $BLOCK_BUTTON in
3) brightnessctl -q s 30% ;; # right click
4) brightnessctl -q s +10% ;; # scroll up
5) brightnessctl -q s 10%- ;; # scroll down
esac
PERCENTAGE=$(brightnessctl | awk '/\([0-9]+%\)/ { print substr($4, 2, length($4) - 3) }')
if [ "$PERCENTAGE" -ge "75" ]; then
ICON=""
elif [ "$PERCENTAGE" -ge "25" ]; then
ICON=""
else
ICON=""
fi
echo $ICON $PERCENTAGE%