#!/bin/bash

PROCESSINGTITLE='Please Wait For Print Confirmation'
PROCESSINGMESSAGE='\nYou must confirm your print job before it will be sent to the printer, please wait while it is processed...\n'

. /etc/groovix/gxprintconfirm-gui.conf



while true; do
        sleep 0.2
        echo p
        #need to make sure while loop doesn't keep running indefinitely, causing this program not to exit and print jobs never to finish
        #ps -e | grep pkpgcounter && break
done | groovix-root-run-in-display gx-pcpi-zenity --progress --no-cancel --title "$PROCESSINGTITLE" --pulsate --text "$PROCESSINGMESSAGE"  --auto-close &

#force focus - not necessary here, do it when actual question pops up
#sleep 1
#groovix-root-run-in-display wmctrl -F -a "$PROCESSINGTITLE" -b add,above

