Created
November 18, 2017 00:55
-
-
Save ryochack/0c3036b03dbe54005981517ef1c155e5 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
# https://wiki.archlinuxjp.org/index.php/Xrandr#.E3.82.B9.E3.82.AF.E3.83.AA.E3.83.97.E3.83.88 | |
MAIN="LVDS-1" | |
EXT="VGA-1" | |
if (xrandr | grep -q "$EXT disconnected"); then | |
xrandr --output $MAIN --auto --output $EXT --off | |
else | |
xrandr --output $MAIN --auto --primary --output $EXT --auto --above $MAIN | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment