add toggleMonitor script

This commit is contained in:
qvalentin 2021-09-26 14:22:26 +02:00
parent 9a9bdb22fc
commit 7a06470070
3 changed files with 14 additions and 2 deletions

12
.scripts/toggleMonitor Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
primary=DP-1
secondary=HDMI-0
if xrandr | grep "$secondary connected 1920x1080"; then
echo "Turing second monitor off"
xrandr --output "$secondary" --off
else
echo "Turing second monitor on"
xrandr --output "$secondary" --left-of "$primary" --auto
fi