Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use strict;
use warnings;
use Desktop::Notify;
use IPC::Message::Minivan;
use Encode;
my $notify_timeout = 500;
my $icon = "/usr/share/pixmaps/pidgin/protocols/scalable/irc.svg";
#my $icon = "gnome-irc.png";
my $van = IPC::Message::Minivan->new(host => 'localhost');
our $notify = Desktop::Notify->new();
my $notification = $notify->create(summary => 'Minivan', body => 'Connection established', timeout => $notify_timeout, app_icon => $icon);
while (1) {
if (my $cmd = $van->get(5,[])) {
if ($cmd->[0] eq '#irssi') {
my $c=$cmd->[1];
my $message = Encode::encode("utf-8",$c->{msg});
my $summary = $c->{summary};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment