This repository has been archived on 2020-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles_old/scripts/backlight.sh
2018-07-31 21:30:28 +03:00

23 lines
443 B
Bash
Executable File

#!/bin/bash
backlight_float=$(xbacklight -get)
current_backlight=${backlight_float%%.*}
case $1 in
"raise")
(( current_backlight += 5 ))
[[ $current_backlight -gt 100 ]] && current_backlight=100
xbacklight -set $current_backlight
notify-send $current_backlight
;;
"lower")
(( current_backlight -= 5 ))
[[ $current_backlight -lt 5 ]] && current_backlight=1
xbacklight -set $current_backlight
notify-send $current_backlight
;;
esac