2013年10月10日星期四

Switch between Single Display and Dual Display using xrandr in Command Line

setdual.sh:

#!/bin/bash

export DISPLAY=:0

xrandr --output HDMI-1 --rotate right --mode 1920x1080
xrandr --output LVDS-1 --pos 1080x1000


setsing.sh:

#!/bin/bash

export DISPLAY=:0

xrandr --output HDMI-1 --off