test.sh (412B)
1 #!/bin/sh 2 3 # This is very hacky. 4 5 export LTKDDIR=".ltkd" 6 export LTKDIR="../../config.example" 7 ltk_id=`../../src/ltkd/ltkd -t "Cool Window"` 8 if [ $? -ne 0 ]; then 9 echo "Unable to start ltkd." >&2 10 exit 1 11 fi 12 13 cat test.gui | ../../src/ltkd/ltkc $ltk_id | while read cmd 14 do 15 case "$cmd" in 16 *"event btn1 button press") 17 echo "quit" 18 ;; 19 *) 20 printf "%s\n" "$cmd" >&2 21 ;; 22 esac 23 done | ../../src/ltkd/ltkc $ltk_id