aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-12-15 00:00:12 +0100
committerTeddy Wing2017-12-15 00:00:12 +0100
commitbc90bd595598155ccafbe1cfd6fb3f044d038769 (patch)
tree74aae120f3a898a75b77aad220cacb8b7455e309
downloadirssi-vimput-bc90bd595598155ccafbe1cfd6fb3f044d038769.tar.bz2
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
-rw-r--r--vimput.pl20
1 files changed, 20 insertions, 0 deletions
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);
+};