jump to navigation

Mark irssi window as unread 2013 September 24 16:00

Posted by diamond in : Tech , trackback

Someone messages me on irc/im, i change to the irssi window, see that it’s something i want to leave for later, then promptly forget about it. This has been happening for many years. Today, it finally ends. I present unread.pl, and tiny irssi script that allows me to mark windows as unread:

$ cat unread.pl
#!/usr/bin/perl -w
sub cmd_unread {
my ($data, $server, $witem) = @_;
my $base = Irssi::window_find_refnum(1);
my $target;
if ($data eq "") {
$target = Irssi::active_win();
} else {
$target = Irssi::window_find_refnum($data);
Irssi::command_bind("unread", "cmd_unread");

If given no argument, it marks the current window as unread and switches to window 1. Otherwise it just marks the specified window as unread.


no comments yet - be the first?