Advertisement
Guest User

kwolek

a guest
Sep 29th, 2009
2,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. #!/bin/bash
  2. # This script written by Erwin Kwolek is under public domain
  3. # Can be improved with screen name detection
  4.  
  5. First="LVDS"
  6. Second="VGA-0"
  7.  
  8. if [[ `xrandr --current | grep " connected" | wc -l` == 2 ]]
  9. # if there is two screens connected, set the second one at the left to make a wide desktop
  10. then xrandr --output $Second --left-of $First
  11. xrandr --output $First --mode 1600x1200 # because new xorg autodetection doesn t always work
  12. # else, set the only one as the only desktop available
  13. else xrandr --output $First --pos 0x0
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement