#!/bin/sh POSITION_CONFIG="/usr/local/etc/X11/monitor-position.sh" if [ -r "$POSITION_CONFIG" ]; then . "$POSITION_CONFIG" fi POS=${POS:-1920x-600} OUTPUTS=$( xrandr -q | grep connected | cut -d\ -f 1) LVDS=$(echo "$OUTPUTS" | grep LVDS | tail -1) HDMI=$(echo "$OUTPUTS" | grep HDMI | tail -1) xrandr --output "$HDMI" --rotate right --right-of "$LVDS" --pos "${POS}" echo "xrandr position=$POS, exit-code=$?" >> /tmp/xrandr.log