[xmonad] xmobar new plugins and features
Ivan Veselov
veselov at gmail.com
Thu Apr 10 08:03:27 EDT 2008
Hi all!
I've implemented a couple of new mail plugins for XMobar and added
config commenting possibility.
1. GMail plugin.
Uses GMail's Atom feed to retrieve data about new messages.
Data is taken from:
https://mail.google.com/mail/feed/atom
Plugin uses 'curl' with SSL support, username and password should be
given in .xmobarrc.
Then data is parsed using simple custom Parsec-based Atom parser
(which is not a general Atom parser, it's written only for parsing
GMail Atom format and to not increase dependencies list of xmobar).
Usage example:
Add
, Run GMail "veselov" "secret_password" 1200
to 'commands' part of the config (.xmobarrc) and
GMail: <fc=red>%gmail%</fc>
to the template.
2. POP3 mail plugin.
Uses 'network' package to talk with POP3 server using sockets. Handle
errors intelligently (displays 'Login failed', 'Connection failed' and
'N/A' according to real reason of the failure).
Usage example:
Add the following to 'commands' part of config to add checking two POP3 servers:
, Run POP3 "pop3.yandex.ru" 110 "veselov" "pwd1" "yandex" 6000
, Run POP3 "eth0.net.ua" 110 "sphynx" "pwd2" "eth0mail" 5000
Format is:
Run POP3 <server_name> <server_port> <login> <password>
<name_of_this_pop3_entry_in_template> <refresh_rate>
And then add:
Yandex: %yandex% | Eth0mail: %eth0mail%
to your template.
3. Possibility of commenting lines of the config with '--' at the
beginning of line (or even after some whitespace).
These patches aren't accepted yet by Andrea Rossato in spite of the
fact that they were adopted a bit by himself, because they do increase
number of dependencies of xmobar ('network' for POP3 and 'time' for
GMail). But I find them really useful, so announcing here.
You can pull the patches from:
http://histoma.com/repos/xmobar
This repository currently includes all the patches from original
xmobar repo + my mail and comment patches. And I update it from xmobar
repo regularly.
Enjoy!
Feedback is appreciated.
WBR,
Ivan N. Veselov aka sphynx.
More information about the xmonad
mailing list