Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitors=`xrandr`
- echo $monitors | grep "VGA1 connected" > /dev/null
- VGA=$?
- echo $monitors | grep "HDMI1 connected" > /dev/null
- HDMI=$?
- if [ $VGA -eq 0 ]
- then
- if [ $HDMI -eq 0 ]
- then
- xrandr --output DP1 --off
- xrandr --output VGA1 --auto --output HDMI1 --auto --right-of VGA1
- else
- xrandr --output HDMI1 --off
- xrandr --output VGA1 --auto --output DP1 --auto --left-of VGA1
- fi
- else
- xrandr --output VGA1 --off --output HDMI1 --off
- xrandr --output DP1 --auto
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement