Adjust brightness on active display

This commit is contained in:
dbroqua 2020-09-16 20:31:57 +02:00
parent e8e229a4a8
commit 896fb98ab1

View file

@ -1,6 +1,7 @@
#! /bin/bash
CURRENT=`xrandr --verbose | grep -m 1 -i brightness | cut -f2 -d ' '`
OUTPUT=`xrandr|grep ' connected'|grep 'primary'|cut -d' ' -f 1`
GAP=0.1
NEWVALUE=${CURRENT}
@ -16,7 +17,8 @@ case $1 in
;;
read)
echo "${CURRENT}*100/1"|bc
exit 0
;;
esac
xrandr --output eDP-1 --brightness ${NEWVALUE}
xrandr --output ${OUTPUT} --brightness ${NEWVALUE}