linux - Bash script : Get user input in a terminal that is not focus on -


in open terminal, use user input script :

while true     echo "please scan barcode :"     read string     result=`node node.js $string`     echo "--> $result"     // launch image viewer (feh)     sh ./feh.sh $result done 

this script reads user input because terminal focus on, when launches image viewer (in fullscreen mode), terminal becomes in background of image viewer. if user type on keyboard, script couldn't read anything.

do know how user inputs if terminal window in background of image viewer ?


Comments