Created
September 3, 2018 11:17
-
-
Save rkfg/eb06ff29346cb2bab81b3afdb17efffd to your computer and use it in GitHub Desktop.
Display switcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DISPLAY=:0 | |
MAIN=DVI-D-0 | |
TV=HDMI-0 | |
if xrandr --listactivemonitors | grep -q "$MAIN" | |
then | |
xrandr --output "$MAIN" --off | |
xrandr --output "$TV" --auto | |
else | |
xrandr --output "$TV" --off | |
xrandr --output "$MAIN" --auto | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment