scripts

random assortment of scripts
git clone git://git.andersuno.nu/scripts.git
Log | Files | Refs

brightdown.sh (299B)


      1 #!/bin/bash
      2 
      3 brightness_file=/sys/class/backlight/intel_backlight/brightness
      4 brightness=$(< $brightness_file)
      5 
      6 if [ $((brightness > 0)) '=' 1 ]
      7 then
      8    brightness=$((brightness - 10))
      9 
     10    if [ $((brightness < 1)) '=' 1 ]
     11    then
     12       brightness=1
     13    fi
     14    echo -n $brightness > $brightness_file
     15 fi