F8x86_64 on the Acer Ferrari 3400LMi
# | LVDS+Svideo (mirror) | => |
#LVDS+Svideo (sidebyside) =>
# | LVDS+VGA0 | (mirror) | => |
# | LVDS+VGA0 | (sidebyside) | => |
# | LVDS | (single) | => |
#...
#Connection modes that include not connected outputs are skipped.
#Ex: with only VGA0 connected it is only three connection modes:
if [ "$CURRENT" != "$INTERNAL" a \ "${ALLPOS[$INTNDX]}" == "${ALLPOS[$CURNDX]}" ]; then
NEXT=$CURRENT
else
for (( i=0; i<${#ALLOUT[*]}; i++ )) {
[ "${CONCTD[$i]}" == "${CURRENT}" ] && break
}
until [ "$NEXT" ]; do
i=$(( ($i+1)%${#ALLOUT[*]} )) NEXT=${CONCTD[$i]}
done
fi
#Internal output always active INT="output $INTERNAL auto"
#Turn off currently active external output
["$CURRENT" != "$INTERNAL" a "$CURRENT" != "$NEXT" ] && \ OFF="output $CURRENT off"
#Turn on next connected external output [ "$NEXT" != "$INTERNAL" ] && \
ON="output $NEXT auto"
#If mirror mode, reposition internal output.
#Otherwise position external output
["$NEXT" != "$CURRENT" ] \
&&INT="$INT pos 0x0" \ ON="$ON $LOCATION"
run xrandr $INT $OFF $ON
}
case `echo "$ACTION" tr AZ az` in init)
init
;;
toggle) toggle
;;
status) status
;;
50