Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cur=$(bl1)
- if [ "$1" = up ]
- then
- new="$(echo $cur + 1 | bc)"
- elif [ "$1" = down ]
- then
- new="$(echo $cur - 1 | bc)"
- else
- new="$cur"
- fi
- bl1 "$new"
- echo "$new"
- icon=$(python -c "print\
- {-1:'off',0:'off',1:'off',2:'off',3:'low',4:'low',5:'low',\
- 6:'medium',7:'medium',8:'medium',9:'high',10:'high',11:'high',\
- 12:'full',13:'full',14:'full',15:'full'}[$new-1]")
- pc=$(python -c 'x = max(min(15,'"$new"'),1); print float(x-1)/14 *100')
- notify-send "Brightness" -i notification-display-brightness-"$icon" -h int:value:"$pc" -h string:synchronous:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement