aboutsummaryrefslogtreecommitdiffstats
path: root/history-search
diff options
context:
space:
mode:
Diffstat (limited to 'history-search')
-rw-r--r--history-search/history_search.pl44
-rw-r--r--history-search/irssi/config19
-rw-r--r--history-search/irssi/default.theme8
3 files changed, 23 insertions, 48 deletions
diff --git a/history-search/history_search.pl b/history-search/history_search.pl
index d54e264..0a2282e 100644
--- a/history-search/history_search.pl
+++ b/history-search/history_search.pl
@@ -148,47 +148,3 @@ sub UNLOAD {
print Dumper(\@_);
uninstall_prompt();
}
-# my $prev_typed;
-# my $prev_startpos;
-# my $enabled = 0;
-
-# Irssi::command_bind('history_search', sub {
-# $enabled = ! $enabled;
-# if ($enabled) {
-# $prev_typed = '';
-# $prev_startpos = 0;
-# }
-# });
-
-# Irssi::signal_add_last 'gui key pressed' => sub {
-# my ($key) = @_;
-
-# if ($key == 10) { # enter
-# $enabled = 0;
-# }
-
-# return unless $enabled;
-
-# my $prompt = Irssi::parse_special('$L');
-# my $pos = Irssi::gui_input_get_pos();
-
-# if ($pos < $prev_startpos) {
-# $enabled = 0;
-# return;
-# }
-
-# my $typed = substr($prompt, $prev_startpos, ($pos-$prev_startpos));
-
-# my $history = ($typed eq '') ? '' : Irssi::parse_special('$!' . $typed . '!');
-# if ($history eq '') {
-# $history = $typed;
-# }
-
-# my $startpos = index(lc($history), lc($typed));
-
-# Irssi::gui_input_set($history);
-# Irssi::gui_input_set_pos($startpos + length($typed));
-
-# $prev_typed = $typed;
-# $prev_startpos = $startpos;
-# };
diff --git a/history-search/irssi/config b/history-search/irssi/config
index 6b7db48..6b46771 100644
--- a/history-search/irssi/config
+++ b/history-search/irssi/config
@@ -151,6 +151,8 @@ aliases = {
rltest = "/script unload history_search; /script load history_search.pl";
DUMP = "script exec use Data::Dumper\\; print Data::Dumper->new([\\\\$0-])->Dump";
funcs_for = "/dump [map *\\$_{NAME}, grep ref(\\$_) eq 'GLOB' && *\\$_{CODE} && *\\$_{PACKAGE} eq 'Irssi::UI::Window', values \\%Irssi::UI::Window::]";
+ et = "/script unload expando_test.pl; /script load expando_test";
+ se = "script exec";
};
statusbar = {
@@ -269,3 +271,20 @@ settings = {
"perl/core/scripts" = { autoinstall_custom_prompt = "yes"; };
"fe-common/core" = { bell_beeps = "yes"; };
};
+keyboard = (
+ {
+ key = "meta-g";
+ id = "command";
+ data = "se print defined(Irssi::gui_input_set(\"hello\"))?1:0";
+ },
+ { key = "meta-x"; id = "command"; data = "history_search "; },
+ {
+ key = "M-g";
+ id = "command";
+ data = "se print defined(Irssi::gui_input_set(\"hello\"))?1:0";
+ },
+ { key = "^Z"; id = "command"; data = "echo moo"; },
+ { key = "^O"; id = "command"; data = "echo moo"; },
+ { key = "^o"; id = "command"; data = "echo moo"; },
+ { key = "^R"; id = "command"; data = "history_search_start "; }
+);
diff --git a/history-search/irssi/default.theme b/history-search/irssi/default.theme
index 5e2a735..357a98e 100644
--- a/history-search/irssi/default.theme
+++ b/history-search/irssi/default.theme
@@ -66,7 +66,7 @@ abstracts = {
line_start = "%B-%W!%B-%n ";
# timestamp styling, nothing by default
- timestamp = "$*";
+ timestamp = "[[[$*]]]";
# any kind of text that needs hilighting, default is to bold
hilight = "%_$*%_";
@@ -250,12 +250,12 @@ abstracts = {
# default background for all statusbars. You can also give
# the default foreground color for statusbar items.
- sb_background = "%4%w";
+ sb_background = "%5%w";
# default backround for "default" statusbar group
#sb_default_bg = "%4";
# background for prompt / input line
- sb_prompt_bg = "%n";
+ sb_prompt_bg = "%w";
# background for info statusbar
sb_info_bg = "%8";
# background for topicbar (same default)
@@ -271,7 +271,7 @@ abstracts = {
topicsbstart = "{sbstart $*}";
topicsbend = "{sbend $*}";
- prompt = "[$* $expando_test] ";
+ prompt = "[$*$prompt_additional] ";
sb = " %c[%n$*%c]%n";
sbmode = "(%c+%n$*)";