[dev] [grep-notify] A simple notifier when stdout prints a pattern

From: Amadeus Folego <amadeusfolego_AT_gmail.com>
Date: Sat, 28 Jun 2014 16:59:40 -0300

Hi Guys,

for some days I've been looking for a suckless irc client.

I've taken a look and used ii[1] but I did not find it very usable for
me.

So I've been using sic[2] which has been great for me, I had to make
some wrappers to improve the experience, like ignoring PARTs, JOINs, etc.

    sic -h irc.freenode.net -n badosu |\
    grep -v '< QUIT (\|< JOIN (\|< PART (\ |< NICK ('

One thing I've been missing from it though has been a notifier for when
someone would message me, so I've search the internet for something that
could trigger a notify-send when a string was matched on a line.

Since I could not find one, I've started grep-notify[3].

The idea is very simple, it would be used like this:

    sic -h irc.freenode.net -n badosu |\
    grep -v '< QUIT (\|< JOIN (\|< PART (\ |< NICK (' |\
    grep-notify "[^(]badosu[^)]" irc.freenode.net

So that I could receive a nice message with libnotify.

It's current status is very prototypical and it's by no measure near to
something that I would like to share or tell others to use, I know it's working
for simple things though.

So, back to my original goal, I am still having some problems, output
stops being printed after a certain threshold, ~ 20 lines, when using it
with sic, I don't know yet why.

If you guys have any idea or know of another program that could help me
with this, it would be great!

Best, Amadeus.

[1]: http://tools.suckless.org/ii/
[2]: http://tools.suckless.org/sic/
[3]: https://github.com/badosu/grep-notify/blob/master/grep-notify.c
Received on Sat Jun 28 2014 - 21:59:40 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 28 2014 - 22:12:06 CEST