mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-11 13:50:48 -05:00
19 lines
318 B
Bash
Executable file
19 lines
318 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Create fake X
|
|
Xvfb :200 &
|
|
XPID=$!
|
|
|
|
# wait till it is up, run rofi with error message
|
|
sleep 1 && ./rofi -e "Printing error message" -display :200 &
|
|
RPID=$!
|
|
|
|
# send enter.
|
|
sleep 5 && DISPLAY=:200 xdotool key Return
|
|
|
|
# Get result, kill xvfb
|
|
wait ${RPID}
|
|
RETV=$?
|
|
kill ${XPID}
|
|
sleep 1
|
|
exit ${RETV}
|