You are not logged in.

#1 2013-11-06 19:05:41

hddnhrst
Member
From: Germany
Registered: 2012-11-20
Posts: 26

E-Mail Notification in System Tray

Hey,

I use xmonad with xmobar and trayer as my desktop environment - mostly working with terminals and CLI apps.

For E-Mails I use mutt with offlineimap, run every 20min from a cronjob.

Now what is a good solution to get a notification icon into my system tray when there's new mail?

I read something about biff, others suggest using conky.
I don't really know how to do it. Please point me to the right way...

Something clean and simple.

Offline

#2 2013-11-06 20:09:56

skualito
Member
Registered: 2008-11-19
Posts: 184

Re: E-Mail Notification in System Tray

If you would be satisfied with a notification system but not in trayer, then have a look at the script there:
https://github.com/erikw/dotfiles/blob/ … r_watch.sh.

Offline

#3 2013-11-06 21:57:39

Raynman
Member
Registered: 2011-10-22
Posts: 1,074

Re: E-Mail Notification in System Tray

If you're going to use desktop notifications with offlineimap, offlineimap-notify seems like a better option.

Instead, you could write a shell script that periodically checks the "new" subdirectories in your maildir to determine the icon to show and incorporate that into your bar. But xmobar seems to provide plugins for maildirs and mboxes as well.

Offline

#4 2013-11-07 16:24:31

hddnhrst
Member
From: Germany
Registered: 2012-11-20
Posts: 26

Re: E-Mail Notification in System Tray

Thanks. How does offlineimap-notify work?

Offline

#5 2013-11-07 19:07:36

Raynman
Member
Registered: 2011-10-22
Posts: 1,074

Re: E-Mail Notification in System Tray

hddnhrst wrote:

Thanks. How does offlineimap-notify work?

What exactly do you want to know? I mean, you can look at the man page (also on bitbucket) or the source. Basically it decorates some of offlineimap's classes (injects some code) so that offlineimap will call a notification function (provided by offlineimap-notify) when an account finishes syncing. Then it runs offlineimap (it's just a wrapper).

Offline

#6 2013-11-07 19:32:23

hddnhrst
Member
From: Germany
Registered: 2012-11-20
Posts: 26

Re: E-Mail Notification in System Tray

Ah okay. So I should replace my cronjob executing offlineimap with a cronjob executing offlineimap-notify instead, right? Sounds really good, thanks for providing this! wink

I still have to figure out what exactly happens with the D-Bus notification and how to make it visible...

[edit] I think i need libnotify for this.

Last edited by hddnhrst (2013-11-07 20:28:30)

Offline

#7 2013-11-07 19:41:45

namore
Member
Registered: 2013-11-07
Posts: 2

Re: E-Mail Notification in System Tray

I had the same problem (albeit not on archlinux) using offlineimap + mutt - so I wrote a minimal tray icon program which blinks if new mail arrives. It runs in background and you can add it to your .xsession or .xinitrc as described in the howto section: https://github.com/namore/dirwatchtray

Offline

#8 2013-11-07 20:32:03

hddnhrst
Member
From: Germany
Registered: 2012-11-20
Posts: 26

Re: E-Mail Notification in System Tray

Haskell <3

Sounds perfect, will try it out tomorrow.
And welcome to the forums!

Offline

#9 2013-11-08 22:29:49

namore
Member
Registered: 2013-11-07
Posts: 2

Re: E-Mail Notification in System Tray

Haha, yeah, its Haskell. xD

If you got any issues, feel free to contact me (or open a bug etc). :-)

Offline

Board footer

Powered by FluxBB