config_sway/bin/sway_brightness

21 lines
346 B
Bash
Executable file

#!/bin/bash
source $HOME/.config/sway/bin/sway_helpers
DEVICE=sysfs/backlight/intel_backlight
APP=light
## main
_log BRIGHTNESS INFO args: $*
_check_app $APP
case $1 in
d*)
light -s $DEVICE -U 10
;;
i*)
light -s $DEVICE -A 10
;;
*)
echo "invalid argument: \"$1\""
echo "arguments: [decrease|increase]"
;;
esac