bright
This commit is contained in:
parent
4803d9bf78
commit
6c804e57a4
13
bright
13
bright
@ -2,7 +2,7 @@
|
|||||||
# this part is only used for startup scripts mainly
|
# this part is only used for startup scripts mainly
|
||||||
if [ ! -z "$1" ]
|
if [ ! -z "$1" ]
|
||||||
then
|
then
|
||||||
screens="$(xrandr | grep ' connected' | awk '{print $1}')"
|
screens="`xrandr | grep ' connected' | awk '{print $1}'`"
|
||||||
for s in $screens; do
|
for s in $screens; do
|
||||||
xrandr --output "$s" --brightness "0.7"
|
xrandr --output "$s" --brightness "0.7"
|
||||||
echo xrandr --output "$s" --brightness "0.7"
|
echo xrandr --output "$s" --brightness "0.7"
|
||||||
@ -11,12 +11,13 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Changes brightness through dmenu (because i like my eyes)
|
# Changes brightness through dmenu (because i like my eyes)
|
||||||
level=$(echo "$(seq 1 100)" | dmenu -i -p 'Brightnesss from 1-100')
|
level=`seq 1 100 | dmenu -i -p 'Brightnesss from 1-100'`
|
||||||
[ -z "$level" ] && exit 0
|
if [ -z "$level" ]; then exit; fi
|
||||||
percentage=$(echo "scale=2;" "$level/100" | bc -l)
|
|
||||||
[ -z "$percentage" ] && exit 0
|
|
||||||
|
|
||||||
screens="$(xrandr | grep ' connected' | awk '{print $1}')"
|
percentage=`echo "scale=2;" "$level/100" | bc -l`
|
||||||
|
if [ -z "$percentage" ]; then exit; fi
|
||||||
|
|
||||||
|
screens="`xrandr | grep ' connected' | awk '{print $1}'`"
|
||||||
for scr in $screens;do
|
for scr in $screens;do
|
||||||
xrandr --output "$scr" --brightness $percentage
|
xrandr --output "$scr" --brightness $percentage
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user