From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Thu, 14 May 2009 15:04:44 +0200 Subject: [sup-talk] Notification tools In-Reply-To: <391beaa80905131723k4b59090bi5bd541d97d1a75f2@mail.gmail.com> References: <1242213878-sup-4217@ptoseis> <1242239740-sup-8633@entry> <391beaa80905131723k4b59090bi5bd541d97d1a75f2@mail.gmail.com> Message-ID: <1242305907-sup-1542@ausone.inria.fr> Excerpts from Henri Ducrocq's message of Thu May 14 02:23:00 +0200 2009: > On Wed, May 13, 2009 at 7:54 PM, William Morgan wrote: > > > Periodically dumping all new messages into a dummy mbox file is a > > terrible idea, but I think that's your only Sup-specific option. > > Patching mail-notification is a better idea, though that may not be what > > you want to hear. > > > It isn't :) > > > If you're using a recent Gnome, you have some other options. If you're > > running notification-daemon (e.g. Ubuntu 9.04), you can install the > > libnotify-bin package and having the after-poll hook call notify-bin on > > new email. (Not quite the same.) You can also look at the > > indicator-applet: libindicate also has Python bindings, so you could > > install python-indicate and write a python short program to use that. > > > I don't use Gnome or KDE (or anything really.) > Re. the notification-daemon tip, that's what I'm doing already (via a python > script of mine, I didn't know about notify-bin!), but sure it isn't the > same. > What I might do: Have after-poll dump the number of unread messages into a > file, > and display that value in my dzen status bar. It might be good enough. I'm doing something quite similar: I have a status-bar-text hook. $ cat ~/.sup/hooks/status-bar-text.rb dir = ENV['HOME']+'/.sup/' state_new = dir+'state.new' File.open(state_new, 'w') do |f| f.puts "SupState { sup_num_inbox_unread = #{num_inbox_unread} }" end File.rename(state_new, dir+'state') rescue nil nil Then I have tweaked my xmonad config to inject the contents of this file in my dzen bar. Best regards, -- Nicolas Pouillard