commit 73a3b12271f84a704921a3e3f8a5026aaf2be235 parent cd66385ee865ce8841e213a437d0696a2ba8443c Author: Alex Balgavy <a.balgavy@gmail.com> Date: Tue, 17 Sep 2019 02:50:20 -0400 xrandr-brightness: set brightness with xrandr Former-commit-id: ea4228e56d3bceabb45057fd44db263e1c0ac139 Diffstat:
A | scripts/xrandr-brightness | | | 14 | ++++++++++++++ |
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/scripts/xrandr-brightness b/scripts/xrandr-brightness @@ -0,0 +1,14 @@ +#!/bin/sh +if [ "$1" = "up" ]; then + brightness="$(xrandr --verbose |grep Brightness |grep -o '[0-9].*')" + if ! [ "$brightness" = "1.0" ]; then + xrandr --output LVDS-0 --brightness $(echo "$brightness+0.05" | bc) + fi +elif [ "$1" = "down" ]; then + brightness="$(xrandr --verbose |grep Brightness |grep -o '[0-9].*')" + if ! [ "$brightness" = "0.0" ]; then + xrandr --output LVDS-0 --brightness $(echo "$brightness-0.05" | bc) + fi +elif [ "$1" = "gamma" ]; then + xrandr --output LVDS-0 --gamma "$2" +fi