Skip to content

Instantly share code, notes, and snippets.

@kennyp
Created February 21, 2013 20:48
Show Gist options
  • Save kennyp/5008089 to your computer and use it in GitHub Desktop.
Save kennyp/5008089 to your computer and use it in GitHub Desktop.
Replace `_` with `/` for paths. .irssi files live on the server `watch-the-ding' is local.
#!/usr/bin/bash
ssh new.jroes.net 'cat /dev/null > ~/.the-ding && tail -f ~/.the-ding' | while read hit
do
mplayer -really-quiet -noar /usr/share/sounds/gnome/default/alerts/glass.* &> /dev/null
done
#!/bin/bash
echo ding >> ~/.the-ding
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
authors => 'Kenny Parnell',
contact => 'k.parnell@gmail.com',
name => 'sounds',
description => 'Play sounds for different events in irssi.',
license => 'GNU General Public License'
);
sub priv_msg {
my ($server,$msg,$nick,$address,$target) = @_;
`~/.irssi/play-glass`;
}
Irssi::signal_add("message private", "priv_msg");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment