dotfiles/dot_config/i3/bin/executable_brightness.sh

15 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