Skip to content

Instantly share code, notes, and snippets.

@Nooby
Created December 1, 2011 22:36
Show Gist options
  • Save Nooby/1420399 to your computer and use it in GitHub Desktop.
Save Nooby/1420399 to your computer and use it in GitHub Desktop.
Change Primary Display in Gnome 3 to External Display if Available
#!/bin/sh
DISP=`xrandr | tac | grep " connected " -m 1 | cut -d ' ' -f 1`
xrandr --output $DISP --primary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment