Adjust brightness on active display
This commit is contained in:
parent
e8e229a4a8
commit
896fb98ab1
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
CURRENT=`xrandr --verbose | grep -m 1 -i brightness | cut -f2 -d ' '`
|
CURRENT=`xrandr --verbose | grep -m 1 -i brightness | cut -f2 -d ' '`
|
||||||
|
OUTPUT=`xrandr|grep ' connected'|grep 'primary'|cut -d' ' -f 1`
|
||||||
GAP=0.1
|
GAP=0.1
|
||||||
NEWVALUE=${CURRENT}
|
NEWVALUE=${CURRENT}
|
||||||
|
|
||||||
|
@ -16,7 +17,8 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
read)
|
read)
|
||||||
echo "${CURRENT}*100/1"|bc
|
echo "${CURRENT}*100/1"|bc
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
xrandr --output eDP-1 --brightness ${NEWVALUE}
|
xrandr --output ${OUTPUT} --brightness ${NEWVALUE}
|
||||||
|
|
Loading…
Reference in a new issue