January 2009 Archives
2009-01-12 23:37:15
Graphical notifications for centerim
Using centerim's external configuration file makes it pretty easy to get notified about incoming messages. However, if you would add something like the following to your ~/.centerim/external, you'd be informed about *every* single incoming message, which doesn't make much sense, at least not in my eyes....
%action notification event msg proto all status all options nowait %exec #!/bin/bash #msg=`cat` nick=$(head -n 1 $CONTACT_INFODIR/info) echo "new message from $nick" | dzen2 -bg red -fg white -pTo deal with this problem, I wrote two small perl scripts: centerim_notify.pl & offline.pl.
The first one caters for the notifications and stores the screen name of your IM-buddy in a hidden file (~/.centerim/.seen) so you won't get notified again. The latter removes a chat partner from the list, when he logs off.
So, here's how to use it:
- Save both scripts to ~/.centerim/scripts/ and make them executable (chmod +x ...)
- Put the following into your ~/.centerim/external:
%action notification event msg proto all status all options nowait %exec #!/bin/bash nick=$(head -n 1 $CONTACT_INFODIR/info) ~/.centericq/scripts/centerim_notify.pl "$nick" %action offline event offline proto all status all options nowait %exec #!/bin/bash nick=$(head -n 1 $CONTACT_INFODIR/info) ~/.centericq/scripts/offline.pl "$nick"
- Create a bash alias that deletes the "seen-file" everytime you
launch centerim:
echo "alias centerim='rm -f ~/.centericq/.seen && centerim -o'" >> ~/.bashrc
- Run centerim!
2009-01-02 21:30:18
yaydl 0.9.0a
Time for another update - yaydl 0.9.0a is now capable of reading URLs from STDIN, permitting shell commands like the following one:
yaydl.pl --stdin < file_containing_multiple_urls
Additionally, I fixed some minor bugs affecting the routines for vimeo/metacafe/google.