1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/usr/bin/env bash export ROFI_PNG_OUTPUT=out.png rofi -modi run -key-run Alt+F2 & RPID=$! # send enter. sleep 3; xdotool key Alt+F2 sleep 3; xdotool key 't' sleep 0.4 xdotool key 'r' sleep 0.4 xdotool key 'u' sleep 0.4 xdotool key Return sleep 1; kill -s INT ${RPID} # Get result, kill xvfb wait ${RPID} RETV=$? exit ${RETV}