Added brightness script
This commit is contained in:
parent
f245989088
commit
3b11e44798
3 changed files with 31 additions and 0 deletions
22
Bin/brightness.sh
Executable file
22
Bin/brightness.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#! /bin/bash
|
||||
|
||||
CURRENT=`xrandr --verbose | grep -m 1 -i brightness | cut -f2 -d ' '`
|
||||
GAP=0.1
|
||||
NEWVALUE=${CURRENT}
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
NEWVALUE=`echo "${CURRENT}+${GAP}"|bc -l`
|
||||
;;
|
||||
down)
|
||||
NEWVALUE=`echo "${CURRENT}-${GAP}"|bc -l`
|
||||
;;
|
||||
reset)
|
||||
NEWVALUE=1
|
||||
;;
|
||||
read)
|
||||
echo "${CURRENT}*100/1"|bc
|
||||
;;
|
||||
esac
|
||||
|
||||
xrandr --output eDP-1 --brightness ${NEWVALUE}
|
Loading…
Add table
Add a link
Reference in a new issue