From bc90bd595598155ccafbe1cfd6fb3f044d038769 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 15 Dec 2017 00:00:12 +0100 Subject: Print current input contents Yes! Managed to read the current input line contents. Print this out on every key press. Thanks to these resources: Key press signal: https://github.com/shabble/irssi-docs/wiki/Signals#gui-readlinec Getting input line contents: https://github.com/shabble/irssi-docs/wiki/Irssi#getting-the-input-field-contents https://github.com/irssi/scripts.irssi.org/blob/master/scripts/per_window_prompt.pl --- vimput.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 vimput.pl (limited to 'vimput.pl') diff --git a/vimput.pl b/vimput.pl new file mode 100644 index 0000000..fc50740 --- /dev/null +++ b/vimput.pl @@ -0,0 +1,20 @@ +use strict; + +use vars qw($VERSION %IRSSI); +use Irssi; + +$VERSION = '1.0'; +%IRSSI = { + authors => 'Teddy Wing', + contact => 'irssi@teddywing.com', + name => 'Vimput', + description => '', + license => 'GPL', +}; + + +Irssi::signal_add_last 'gui key pressed' => sub { + my ($key) = @_; + + print Irssi::parse_special('$L', undef, 0); +}; -- cgit v1.2.3