commit cc2eacf9cef9bbe611cf5fea577a6ce6308f18f7 parent 750c7014272387afd2a187dbd392da9867ba7cc0 Author: gearsix <gearsix@tuta.io> Date: Mon, 30 Aug 2021 20:30:26 +0100 added xbright Diffstat:
A | src/xbright.sh | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/xbright.sh b/src/xbright.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# xbright (xrandr brightness) +# description: set the brightness using xrandr +# dependencies: xrandr +# e.g.$ xbright -m HDMI-A-0 50 + +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + echo "usage: xbright [-s MONITOR] BRIGHTNESS" + echo "" + echo "xrandr --output \$MONITOR --brightness \$BRIGHTNESS" + exit +fi + +monitor="HDMI-A-0" +if [ "$1" = "-m" ]; then shift; monitor="$1"; shift; fi +xrandr --output $monitor --brightness $1