2014-08-29 10:24:39 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Create fake X
|
2014-08-29 10:39:11 -04:00
|
|
|
Xvfb :201 &
|
2014-08-29 10:24:39 -04:00
|
|
|
XPID=$!
|
|
|
|
|
|
|
|
# wait till it is up, run rofi with error message
|
2014-08-29 10:39:11 -04:00
|
|
|
sleep 1 && ./rofi -rnow -display :201 &
|
2014-08-29 10:24:39 -04:00
|
|
|
RPID=$!
|
|
|
|
|
|
|
|
# send enter.
|
|
|
|
sleep 5;
|
2014-08-29 10:39:11 -04:00
|
|
|
DISPLAY=:201 xdotool key 'shift+slash'
|
2014-08-29 10:24:39 -04:00
|
|
|
sleep 0.4
|
2014-08-29 10:39:11 -04:00
|
|
|
DISPLAY=:201 xdotool key 'shift+slash'
|
2014-08-29 10:24:39 -04:00
|
|
|
sleep 0.4
|
2014-08-29 10:39:11 -04:00
|
|
|
DISPLAY=:201 xdotool key 'shift+slash'
|
2014-08-29 10:24:39 -04:00
|
|
|
sleep 0.4
|
2014-08-29 10:39:11 -04:00
|
|
|
DISPLAY=:201 xdotool key Escape
|
2014-08-29 10:24:39 -04:00
|
|
|
|
|
|
|
# Get result, kill xvfb
|
|
|
|
wait ${RPID}
|
|
|
|
RETV=$?
|
|
|
|
kill ${XPID}
|
2014-08-29 10:39:11 -04:00
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
2014-08-29 10:24:39 -04:00
|
|
|
exit ${RETV}
|