Hello List,
I'm trying to set up a basic new mail notification with zenity. Here's the script:
#!/bin/bash zenity --notification --window-icon="/usr/share/icons/Flat-Blue/48x48/emblems/emblem-mail.png" --text="You have mail."
In Evolution, I setup a filter like so:
Rule name: test
If Status is not Read
Then Run Program ~/bin/notify
I've also made sure to turn on INBOX filtering for the account I'm testing with. The actual script is set to 755.
When a new message arrives, the filter never executes. However, if I select the message and then manually Apply Filters, the filter runs - the icon pops up in the notification area.
I have no idea what's wrong. I'm doing something incorrectly, or Evolution is busted. Anyone have an idea which one?
Thanks,
Ranbir
On Sun, 2006-30-07 at 15:48 -0400, Kanwar Ranbir Sandhu wrote:
When a new message arrives, the filter never executes. However, if I select the message and then manually Apply Filters, the filter runs - the icon pops up in the notification area.
I have no idea what's wrong. I'm doing something incorrectly, or Evolution is busted. Anyone have an idea which one?
Replying to myself: the filter started to work after I logged out and back in.
I had tried closing and opening Evolution, and killing all Evolution processes, but neither fixed the problem. Not quite sure what the difference is.
If anyone's interested, here's my current notify script:
#!/bin/bash
PID=$(ps -C zenity -o pid --no-heading)
if [ -n "$PID" ]; then exit 0 else zenity --notification --window-icon="/usr/share/icons/hicolor/32x32/stock/net/stock_mail.png" --text="You have mail." fi
exit 0
Note: Clicking the mail icon in the notification area makes it disappear. I'd like the click to give focus to Evolution if it's already running, or if it isn't, to start it. But, that's going to require a lot more coding (I suspect), so I'm leaving this as is.
Regards,
Ranbir