Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jmervine
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmervine/9697848 to your computer and use it in GitHub Desktop.
Save jmervine/9697848 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if test "$(xrandr | grep "HDMI1 connected")"; then
xrandr --output LVDS1 --auto --right-of HDMI1
xrandr --output HDMI1 --auto --primary --left-of LVDS1
else
xrandr --output HDMI1 --off
xrandr --output LVDS1 --auto --primary
fi
# exec_always ~/display.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment