sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit da79bac7d3c9e0be7d5025dd14977aaa6e7ebe83
parent 7f3ca63fcb77eae97feec5df30bf173093951664
Author: Kris Maglione <maglione.k@gmail.com>
Date:   Fri, 30 Oct 2009 05:43:59 -0400

Update last commit.
Diffstat:
Mwmii.suckless.org/code_snippets/python/irssi_notifier.md | 18++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/wmii.suckless.org/code_snippets/python/irssi_notifier.md b/wmii.suckless.org/code_snippets/python/irssi_notifier.md @@ -12,21 +12,19 @@ contents: from wmiirc import * from pygmi import * - + def isirssi(client): return Client(client).label == 'irssi' - + def irc_message(whom, message): if isirssi('sel'): return - for t in Tag.all(): - for a in t.index: - for f in a.frames: - if isirssi(f.client): - f.client.urgent = True - notice.show('IRC: %s %s' % (whom, message)) - return - + for c in Client.all(): + if isirssi(c): + c.urgent = True + notice.show('IRC: %s %s' % (whom, message)) + return + events.bind({ Match('ClientFocus', _): lambda e, c: isirssi(c) and setattr(Client(c), 'urgent', False), 'IRCMessage': lambda s: irc_message(*s.split(' ', 2)[1:]),