Skip to content

Instantly share code, notes, and snippets.

@deadcyclo
Created May 10, 2016 18:47
Show Gist options
  • Save deadcyclo/44c122278cf30402d9f30d47703eb3e1 to your computer and use it in GitHub Desktop.
Save deadcyclo/44c122278cf30402d9f30d47703eb3e1 to your computer and use it in GitHub Desktop.
Simple IRSSI plugin used to add a timestamped line to the currently focused window (bind it to control-space to easily keep track of how far you have read).
#!/usr/bin/perl
use strict;
use warnings;
use Irssi;
our $VERSION = 0.1;
our %IRSSI = (
authors => 'Brendan Johan Lee',
contact => 'deadcyclo@vanntett.net',
name => 'mark',
description => 'Adds a timestamped marker line to the chat buffer. Bind it to control-space with /BIND ^@ /mark',
lisence => 'Use it for whatever you want, but at your own risk.',
);
sub addmarker {
my $awin = Irssi::active_win();
my ($sec, $min, $hour) = localtime();
$awin->print("%B█%0%B%8$awin->{'name'}%8█ $hour:$min:$sec %8%8█████████████████████████████████%N%B%N",MSGLEVEL_CLIENTCRAP);
}
Irssi::command_bind('mark','addmarker');
@deadcyclo
Copy link
Author

Works best with a powerline enabled font

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment