Created
May 10, 2016 18:47
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Irssi; | |
our $VERSION = 0.1; | |
our %IRSSI = ( | |
authors => 'Brendan Johan Lee', | |
contact => '[email protected]', | |
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'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works best with a powerline enabled font