Comment 97 for bug 1295267

Revision history for this message
WinEunuchs2Unix (ricklee518) wrote :

Oops I only posted bash comments and not bash code. Here is full function:

xreset () {

    # Reset xrandr to normal, first use: xrandr | grep " connected "
    # HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm
    # eDP-1-1 connected primary 1920x1080+3840+2160 (normal left inverted right x axis y axis) 382mm x 215mm
    # DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm
    xrandr --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal \
           --fb 1920x1080 --panning 1920x1080 \
           --output DP-1-1 --mode 3840x2160 --pos 1920x0 --rotate normal \
           --output eDP-1-1 --mode 1920x1080 --pos 3840x2160 --rotate normal \
           --primary

    # --panning option added because HDMI-0 was mirroring all other monitors
    # and "panning" back and forth. --fb option added next day.

} # xreset