scripts

random scripts
git clone https://git.parazyd.org/scripts
Log | Files | Refs

bright (336B)


      1 #!/bin/sh
      2 
      3 syspath="/sys/class/backlight/intel_backlight"
      4 step=300
      5 
      6 case "$1" in
      7 	+)
      8 		curr="$(cat $syspath/brightness)"
      9 		curr=$(($curr+$step))
     10 		printf "%s" "$curr" > "$syspath"/brightness
     11 		;;
     12 	-)
     13 		curr="$(cat $syspath/brightness)"
     14 		curr=$(($curr-$step))
     15 		printf "%s" "$curr" > "$syspath"/brightness
     16 		;;
     17 	*)
     18 		return 0
     19 		;;
     20 esac