2019-05-15 08:51:58 +00:00
|
|
|
#!/bin/bash
|
2019-07-04 21:39:04 +00:00
|
|
|
# Changes brightness through dmenu (because il ike my eyes)
|
2019-05-15 08:51:58 +00:00
|
|
|
level=$(echo "$(seq 1 100)" | dmenu -i -p 'Brightnesss from 1-100')
|
2019-07-04 21:39:04 +00:00
|
|
|
[ -z "$level" ] && exit 0
|
|
|
|
percentage=$(echo "scale=2;" "$level/100" | bc -l)
|
2019-05-15 08:51:58 +00:00
|
|
|
[ -z "$percentage" ] && exit 0
|
2019-07-04 21:39:04 +00:00
|
|
|
|
|
|
|
screens="$(xrandr | grep ' connected' | awk '{print $1}')"
|
|
|
|
for scr in $screens;do
|
|
|
|
xrandr --output "$scr" --brightness $percentage
|
|
|
|
done
|