summaryrefslogtreecommitdiff
path: root/scripts/cinema.sh
blob: 46c70828b0c35c715ababaa35903bd3ab977637a (plain)
1
2
3
#!/bin/sh
MAIN_DP=DP-0;  
v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done