I have a persistent tmux session running on a server connected to IRC and I wanted to get notifications whenever someone addressed me, irrespective of whether I was connected to the session, or that particular machine at the time.
I use irssi as my IRC client, and there is a script called fnotify that will print any mentions in a channel to a file. I then configured the fnotify script to write to a folder in Dropbox. Now, whenever I am mentioned in freenode, the file is updated across all my machines.
The next challenge was to translate the updating of the fnotify file into a notification on my current machine. As I don’t use libnotify on my Arch machines, I wanted to make it work with dzen21 Enter a simple shell script:
1 2 3 4 5 6
I have included this in my $HOME/.xinitrc
so that it runs in the background after login. Whenever the metadata
attrib switch) of the file changes, a dzen2 notification is
written to my
with the message.
Simple; but does what I need…