add toggleMonitor script
This commit is contained in:
parent
9a9bdb22fc
commit
7a06470070
3 changed files with 14 additions and 2 deletions
12
.scripts/toggleMonitor
Executable file
12
.scripts/toggleMonitor
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue