Skip to content

Instantly share code, notes, and snippets.

@mattn
Created March 5, 2012 04:00
Show Gist options
  • Select an option

  • Save mattn/1976506 to your computer and use it in GitHub Desktop.

Select an option

Save mattn/1976506 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Growl::GNTP;
use Filesys::Notify::Simple;
my $watcher = Filesys::Notify::Simple->new(["."]);
my $growl = Growl::GNTP->new;
$growl->register([ { Name => "FileChanged", }, ]);
$watcher->wait(sub {
my @events = @_;
$growl->notify(
Event => "FileChanged",
Title => "File Changed",
Message => $_->{path},
) for @events;
}) while 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment