diff options
| author | Geert Hauwaerts | 2015-01-28 10:17:59 +0100 |
|---|---|---|
| committer | Geert Hauwaerts | 2015-01-28 10:17:59 +0100 |
| commit | 75cea409a6fd8d26ea059b31b842dad27616106b (patch) | |
| tree | 3b2bde843dc40d2f47147a7794a72ad5a6b31c15 /scripts | |
| parent | 1396a48933bef911967ec1ad94f053d892b14209 (diff) | |
| parent | 994c1260a5418bab604c37a7ade6219a15e2d42f (diff) | |
| download | scripts.irssi.org-75cea409a6fd8d26ea059b31b842dad27616106b.tar.bz2 | |
Merge pull request #123 from ailin-nemui/send_scroll
Add new script send_scroll.pl
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/send_scroll.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/send_scroll.pl b/scripts/send_scroll.pl new file mode 100644 index 0000000..5ab502c --- /dev/null +++ b/scripts/send_scroll.pl @@ -0,0 +1,25 @@ +use strict; +use warnings; +use Irssi; +use Irssi::TextUI; + +# other variations on the theme: scrolling.pl scrollwarn.pl scrolled_reminder.pl antisboops.pl + +our $VERSION = '0.1'; # f030fec17903eb6 +our %IRSSI = ( + contact => 'Nei @ anti@conference.jabber.teamidiot.de', + url => "http://anti.teamidiot.de/", + name => 'send_scroll', + description => 'Scroll down on enter', + license => 'GNU GPLv2 or later', +); + +Irssi::signal_add('key send_line' => sub { + return unless -1 == index Irssi::parse_special('$K'), Irssi::parse_special('$[1]L'); + my $win = Irssi::active_win; + my $view = $win->view; + unless ($view->{bottom}) { + Irssi::signal_stop; + $win->command('scrollback end'); + } +}); |
