dotfiles/dot_config/sway/bin/executable_brightness.sh

16 lines
438 B
Bash

#!/bin/bash
case "$1" in
increase)
CURRENT=`cat /sys/class/backlight/intel_backlight/brightness`
((FOO=CURRENT+500))
exec echo $FOO | tee /sys/class/backlight/intel_backlight/brightness
;;
decrease)
CURRENT=`cat /sys/class/backlight/intel_backlight/brightness`
((FOO=CURRENT-500))
exec echo $FOO | tee /sys/class/backlight/intel_backlight/brightness
;;
esac
exit 0