document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. # Script for dual monitors on openbox
  3.  
  4. LVDS="LVDS1"
  5. VGA="VGA1"
  6. HDMI="HDMI1"
  7.  
  8. CHK_VGA=$(xrandr |grep $VGA | awk \' { print $2 } \')
  9.  
  10. CHK_VGA_G=$(xrandr |grep $VGA | grep "+")
  11.  
  12. function dual_it_up(){
  13. xrandr --output $LVDS --auto --output $VGA --auto
  14. xrandr --output $VGA --left-of $LVDS
  15. }
  16.  
  17. if [ "$CHK_VGA" == "connected" ]; then
  18.     dual_it_up
  19. elif [ "$CHK_VGA_G" ]; then
  20.     dual_it_up
  21. else
  22.     xrandr --output $LVDS --auto
  23. fi
  24.  
  25. #feh --bg-scale $HOME/.wallpaper.jpg
  26.  
  27. exit 1
');