#!/bin/sh ###################################################################### # Simple interactive shell script to demonstrate an oddity within # the z-layering algorithm within the floating mode of wmii. ###################################################################### WMII_VERSION='3.5.1' CLIENT1=xeyes CLIENT2=xlogo CLIENT3=xclock WIDTH=150 HEIGHT=150 pause() { action="$*" [ -z "$action" ] && action="to continue" read -p "Press $action: " } xwrite() { file="$1"; shift echo -n "$@" | wmiir write "$file" } wmiiselect() { xwrite /tag/sel/ctl select $1 } cleanup() { #echo "Closing test clients..." #clients=`jobs -l | tr -s ' ' | grep "CLIENT. -geom .{WIDTH}x" | cut -d' ' -f 2` #kill -TERM $clients; } echo "Checking for wmiiwm version ${WMII_VERSION}" wmiiwm -v | grep ${WMII_VERSION} >/dev/null [ $? = 1 ] && (echo "This test suite expects to operate on wmiiwm ${WMII_VERSION}"; exit) # toggle float mode echo "Toggling to floating mode..." wmiiselect toggle # fire up test clients echo -n "Firing up test clients" $CLIENT1 -geom ${WIDTH}x${HEIGHT}+125+150& echo -n "."; sleep 1 $CLIENT2 -geom ${WIDTH}x${HEIGHT}+100+100& echo -n "."; sleep 1 $CLIENT3 -geom ${WIDTH}x${HEIGHT}+150+125& echo -n "."; sleep 1 echo " done" CLIENT1=`printf "%-8s" $CLIENT1` CLIENT2=`printf "%-8s" $CLIENT2` CLIENT3=`printf "%-8s" $CLIENT3` wmiiselect toggle pause "start the test suite" ## Test 0 echo -en "\e[2J\e[H" cat <