From 01ced0b7ce47d279789efb2dc70d1cd009ac56ad Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 9 Oct 2021 22:20:41 +0100 Subject: initial commit --- scripts/cinema.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 scripts/cinema.sh (limited to 'scripts/cinema.sh') diff --git a/scripts/cinema.sh b/scripts/cinema.sh new file mode 100755 index 0000000..c453260 --- /dev/null +++ b/scripts/cinema.sh @@ -0,0 +1,3 @@ +#!/bin/sh +MAIN_DP=DP-2; +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 -- cgit v1.2.3