summaryrefslogtreecommitdiff
path: root/scripts/cinema.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-10-09 17:42:22 +0100
committerdavidovski <david@davidovski.xyz>2023-10-09 17:42:22 +0100
commit02a4a3a4c1e6116158b807674709f26933ac5b10 (patch)
tree84f325f6e8ed2a6ccc618ebb358cea8f1faa95e9 /scripts/cinema.sh
parent051ed527f64b0d7f400f76244b3d63a7ac98bb70 (diff)
Add desktop background
Diffstat (limited to 'scripts/cinema.sh')
-rwxr-xr-xscripts/cinema.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/cinema.sh b/scripts/cinema.sh
index 5352a6e..c0e2938 100755
--- a/scripts/cinema.sh
+++ b/scripts/cinema.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-MAIN_DP=DP-1;
+MAIN_DP=$($HOME/.scripts/primary-display.sh);
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