F8x86_64 on the Acer Ferrari 3400LMi
echo "${ALLINFO[$i]}" \
| awk F@ '/@/ {print $1}' \
)
# Array with all active outputs
ACTIVE[$i]=$( \
echo "${ALLINFO[$i]}" \
| awk F@ '/@[09]+x/ {print $1}' \
)
# Array with all resolutions
ALLRES[$i]=$( \
echo "${ALLINFO[$i]}" \
| awk F@ '{print $2}' \
| awk F+ '{print $1}' \
)
# Array with all positions
ALLPOS[$i]=$( \
echo "${ALLINFO[$i]}" \
| awk F@ '{print $2}' \
| awk F+ '/+/ {print $2 "+" $3}' \
)
# Index for the internal output
[ "${ALLOUT[$i]}" == "$INTERNAL" ] && INTNDX=$i
# Index for the currently active external output
[ "${ACTIVE[$i]}" a "${ACTIVE[$i]}" != "$INTERNAL" ] \
&& CURNDX=$i
}
CURNDX=${CURNDX:$INTNDX}
CURRENT=${ALLOUT[$CURNDX]}
case `echo "${SIDE}" | tr AZ az` in
left)
LOCATION="leftof $INTERNAL"
;;
right)
LOCATION="rightof $INTERNAL"
;;
top|above)
LOCATION="above $INTERNAL"
;;
bottom|below)
LOCATION="below $INTERNAL"
;;
esac
function run() {
EXEC="$*"
logger t $ME "Executing: $EXEC"
$EXEC | logger t $ME
}
function init() {
48