xbright.sh (432B)
1 #!/bin/sh 2 # xbright (xrandr brightness) 3 # description: set the brightness using xrandr 4 # dependencies: xrandr 5 # e.g.$ xbright -m HDMI-A-0 50 6 7 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then 8 echo "usage: xbright [-s MONITOR] BRIGHTNESS" 9 echo "" 10 echo "xrandr --output \$MONITOR --brightness \$BRIGHTNESS" 11 exit 12 fi 13 14 monitor="HDMI-A-0" 15 if [ "$1" = "-m" ]; then shift; monitor="$1"; shift; fi 16 xrandr --output $monitor --brightness $1