Last active
December 17, 2015 09:09
-
-
Save ignisf/5585275 to your computer and use it in GitHub Desktop.
add a marker line on away
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
--- a/trackbar.pl 2008-05-17 18:39:11.000000000 +0300 | |
+++ b/trackbar.pl 2013-02-14 18:45:35.000000000 +0200 | |
@@ -128,6 +128,20 @@ | |
} | |
); | |
+Irssi::signal_add( | |
+ 'away mode changed' => sub { | |
+ my $oldwindow = Irssi::active_win(); | |
+ | |
+ if ($oldwindow) { | |
+ my $line = $oldwindow->view()->get_bookmark('trackbar'); | |
+ $oldwindow->view()->remove_line($line) if defined $line; | |
+ $oldwindow->print(line($oldwindow->{'width'}), MSGLEVEL_NEVER); | |
+ $oldwindow->view()->set_bookmark_bottom('trackbar'); | |
+ Irssi::command("redraw"); | |
+ } | |
+ } | |
+); | |
+ | |
sub line { | |
my $width = shift; | |
my $string = $config{'trackbar_string'}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment