logo

scripts

A bunch of scripts, some to be moved to their own repository
commit: fae99eee60b827bfc48ad54c85448ee0851c00a6
parent: dae9223b8ce394bd8fc01cf2141c3a42a3a5be72
Author: lanodan <lanodan.delta@free.fr>
Date:   Sun, 30 Mar 2014 21:35:28 +0200

Suppr un-used scripts

Diffstat:

D.irssi/scripts/hilightwin.pl57---------------------------------------------------------
D.irssi/scripts/notify-send.pl34----------------------------------
2 files changed, 0 insertions(+), 91 deletions(-)

diff --git a/.irssi/scripts/hilightwin.pl b/.irssi/scripts/hilightwin.pl @@ -1,57 +0,0 @@ -# -# Print hilighted messages & private messages to window named "hilight" for -# irssi 0.7.99 by Timo Sirainen -# -# Modded a tiny bit by znx to stop private messages entering the hilighted -# window (can be toggled) and to put up a timestamp. -# - -use Irssi; -use POSIX; -use vars qw($VERSION %IRSSI); - -$VERSION = "0.02"; -%IRSSI = ( - authors => "Timo \'cras\' Sirainen, Mark \'znx\' Sangster", - contact => "tss\@iki.fi, znxster\@gmail.com", - name => "hilightwin", - description => "Print hilighted messages to window named \"hilight\"", - license => "Public Domain", - url => "http://irssi.org/", - changed => "Sun May 25 18:59:57 BST 2008" -); - -sub sig_printtext { - my ($dest, $text, $stripped) = @_; - - my $opt = MSGLEVEL_HILIGHT; - - if(Irssi::settings_get_bool('hilightwin_showprivmsg')) { - $opt = MSGLEVEL_HILIGHT|MSGLEVEL_MSGS; - } - - if( - ($dest->{level} & ($opt)) && - ($dest->{level} & MSGLEVEL_NOHILIGHT) == 0 - ) { - $window = Irssi::window_find_name('hilight'); - - if ($dest->{level} & MSGLEVEL_PUBLIC) { - $text = $dest->{target}.": ".$text; - } - $text = strftime( - Irssi::settings_get_str('timestamp_format')." ", - localtime - ).$text; - $window->print($text, MSGLEVEL_NEVER) if ($window); - } -} - -$window = Irssi::window_find_name('hilight'); -Irssi::print("Create a window named 'hilight'") if (!$window); - -Irssi::settings_add_bool('hilightwin','hilightwin_showprivmsg',1); - -Irssi::signal_add('print text', 'sig_printtext'); - -# vim:set ts=4 sw=4 et: diff --git a/.irssi/scripts/notify-send.pl b/.irssi/scripts/notify-send.pl @@ -1,34 +0,0 @@ -# irssi-notify.pl -use Irssi; -use Net::DBus; - -$::VERSION='0.0.1'; -%::IRSSI = ( - authors => 'Haelwenn MONNIER', - contact => '@lanodan', - name => 'notify-send', - description => 'Displays a pop-up message for message received', - license => 'CC-BY-SA', - ); - -my $APPNAME = 'irssi'; - -my $bus = Net::DBus->session; -my $notifications = $bus->get_service('org.freedesktop.Notifications'); -my $object = $notifications->get_object('/org/freedesktop/Notifications', 'org.freedesktop.Notifications'); - -sub pub_msg { - my ($server,$msg,$nick,$address,$target) = @_; - - if ($msg =~ $notify_nick) { - $object->Notify("${APPNAME}:${server}", 0, 'info', "Public Message in ${target}", "$nick: $msg", [], { }, 3000); - } -} - -sub priv_msg { - my ($server,$msg,$nick,$address) = @_; - $object->Notify("${APPNAME}:${server}", 0, 'info', 'Private Message', "$nick: $msg", [], { }, 3000); -} - -Irssi::signal_add_last('message public', \&pub_msg); -Irssi::signal_add_last('message private', \&priv_msg);