#!/bin/bash
# Script for dual monitors on openbox
LVDS="LVDS1"
VGA="VGA1"
HDMI="HDMI1"
CHK_VGA=$(xrandr |grep $VGA | awk \' { print $2 } \')
CHK_VGA_G=$(xrandr |grep $VGA | grep "+")
function dual_it_up(){
xrandr --output $LVDS --auto --output $VGA --auto
xrandr --output $VGA --left-of $LVDS
}
if [ "$CHK_VGA" == "connected" ]; then
dual_it_up
elif [ "$CHK_VGA_G" ]; then
dual_it_up
else
xrandr --output $LVDS --auto
fi
#feh --bg-scale $HOME/.wallpaper.jpg
exit 1