2014-08-29 11:31:46 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2014-08-30 14:45:08 -04:00
|
|
|
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
|
2014-08-29 11:31:46 -04:00
|
|
|
RPID=$!
|
|
|
|
|
|
|
|
# send enter.
|
|
|
|
sleep 5;
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'c'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'o'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'f'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'f'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'e'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key 'e'
|
2014-08-29 11:31:46 -04:00
|
|
|
sleep 0.2
|
2014-08-30 14:45:08 -04:00
|
|
|
xdotool key Return
|
2014-08-29 11:31:46 -04:00
|
|
|
|
|
|
|
# Get result, kill xvfb
|
|
|
|
wait ${RPID}
|
|
|
|
RETV=$?
|
|
|
|
|
|
|
|
if [ `cat output.txt` != 'coffee' ]
|
|
|
|
then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
exit ${RETV}
|