]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
add new script : unread.pl (small script to reset a window to unread status)
authorGregory Colpart <redacted>
Wed, 1 Apr 2020 03:29:42 +0000 (05:29 +0200)
committerGregory Colpart <redacted>
Wed, 1 Apr 2020 03:29:42 +0000 (05:29 +0200)
scripts/unread.pl [new file with mode: 0644]

diff --git a/scripts/unread.pl b/scripts/unread.pl
new file mode 100644 (file)
index 0000000..ddc2181
--- /dev/null
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+# reset window to unread status
+
+use strict;
+use vars qw($VERSION %IRSSI);
+use Irssi;
+$VERSION = '0.1';
+%IRSSI = (
+    authors => 'Gregory Colpart',
+    contact => 'reg on #evolix@freenode',
+    name => 'unread',
+    description => 'reset window to unread status',
+    license => 'GPLv2 or later',
+    changed => '2020-04-01'
+);
+
+# copy unread.pl to ~/.irssi/scripts/
+# /load unread.pl
+# /unread <window number>
+
+Irssi::command_bind 'unread' => sub {
+    my ( $data, $server, $item ) = @_;
+    $data =~ s/\s+$//g;
+    Irssi::window_find_refnum($data)->activity(3);
+};
+
git clone https://git.99rst.org/PROJECT