diff options
author | terminaldweller <devi@terminaldweller.com> | 2023-07-14 20:01:12 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2023-07-14 20:01:12 +0000 |
commit | 84acce64649c95be6cdc388c40025b0a87a5f591 (patch) | |
tree | 705fdbfa9940e737983d3fce1cfda4338ad14a29 | |
parent | this change makes it so sb_position's statusbar item updates correctly with v... (diff) | |
download | irssi-scripts-84acce64649c95be6cdc388c40025b0a87a5f591.tar.gz irssi-scripts-84acce64649c95be6cdc388c40025b0a87a5f591.zip |
update
-rw-r--r-- | vim_prompt/vim_prompt.pl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vim_prompt/vim_prompt.pl b/vim_prompt/vim_prompt.pl new file mode 100644 index 0000000..6bc560c --- /dev/null +++ b/vim_prompt/vim_prompt.pl @@ -0,0 +1,36 @@ +use Irssi; +use strict; + +Irssi::expando_create('vim_prompt', sub { + my $prompt; + my $cmd_mode = Irssi::parse_special('$vim_cmd_mode', 0, 0); + my $chatnet = Irssi::parse_special('$chatnet', 0, 0); + my $T = Irssi::parse_special('$T', 0, 0); + if (index($cmd_mode, "INS") != -1) { + $prompt="%z005f00%k%9 INS ".$chatnet."/".$T."%N%k%Z005f00%9%N" + } + if (index($cmd_mode, "CMD") != -1) { + $prompt="%z0087d7%k%9 CMD ".$chatnet."/".$T."%N%k%Z0087d7%9%N" + } + if (index($cmd_mode, "EX") != -1) { + $prompt="%zff5f5f%k%9 EX ".$chatnet."/".$T."%N%k%Zff5f5f%9%k%Zff5f5f" + } + return $prompt +}, {}); + +Irssi::expando_create('vim_prompt_empty', sub { + my $prompt; + my $cmd_mode = Irssi::parse_special('$vim_cmd_mode', 0, 0); + my $chatnet = Irssi::parse_special('$chatnet', 0, 0); + my $T = Irssi::parse_special('$T', 0, 0); + if (index($cmd_mode, "INS") != -1) { + $prompt="%z005f00%k%9 INS "."%N%k%Z005f00%9%N" + } + if (index($cmd_mode, "CMD") != -1) { + $prompt="%z0087d7%k%9 CMD "."%N%k%Z0087d7%9%N" + } + if (index($cmd_mode, "EX") != -1) { + $prompt="%zff5f5f%k%9 EX "."%N%k%Zff5f5f%9%k%Zff5f5f" + } + return $prompt +}, {}); |