I'm trying to write a script that will change the notification icon when a condition is met (the existence of file). To understand the yad --notification option, I am modeling the script at
http://code.google.com/p/yad/wiki/NotificationIcon:
# create a FIFO file, used to manage the I/O redirection from shell
PIPE=$(mktemp -u --tmpdir ${0##*/}.XXXXXXXX)
# attach a file descriptor to the file
# add handler to manage process shutdown
# add handler for tray icon left click
# create the notification icon
--text="Notification tooltip" \
--command="bash -c on_click" <&3
The only change I made was to the on_click function, highlighted above. I receive a bash error when I click the icon:
bash: 3: Bad file descriptor
Can anyone explain to me what I'm doing wrong and tell me what I need to do to fix it?
Thanks,
John