From 011c65a31356c33a8f3b406f6cf57da41e21756e Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Wed, 4 Aug 2010 18:52:35 +0100 Subject: some stuff with colour popups --- colour-popup/colour_popup.pl | 6 ++-- docs/Irssi.pod | 65 ++++++++++++++++++++----------------- docs/Signals.pod | 3 ++ history-search/rl_history_search.pl | 1 + prompt_info/prompt_info.pl | 2 ++ test/irssi/config | 7 ---- test/irssi/default.theme | 2 +- 7 files changed, 45 insertions(+), 41 deletions(-) mode change 100644 => 100755 colour-popup/colour_popup.pl diff --git a/colour-popup/colour_popup.pl b/colour-popup/colour_popup.pl old mode 100644 new mode 100755 index b12c4f6..037d106 --- a/colour-popup/colour_popup.pl +++ b/colour-popup/colour_popup.pl @@ -5,7 +5,7 @@ # # usage: # -# after loading the script, add the statusbar item somewhere convenient: +# after loading the script, add the statusbar item somewhere convenient: # /statusbar window add -after barstart colours # @@ -21,7 +21,7 @@ $VERSION = "1.0"; name => "mirc_colour_popup", description => "Shows a mIRC-style colour popup when you hit ^C.", license => "Public Domain", - changed => "9.26.2008", + changed => "31/7/2010", ); @@ -36,7 +36,7 @@ sub colours_sb { if( $vis ) { $txt = join " ", map { "\%$colours[$_]$_" } 0 .. 15; } - $item->default_handler($get_size_only, "{sb $txt}", undef, 1); + $item->default_handler($get_size_only, "\%0{sb $txt}", undef, 1); } diff --git a/docs/Irssi.pod b/docs/Irssi.pod index 5fa8413..eba846e 100644 --- a/docs/Irssi.pod +++ b/docs/Irssi.pod @@ -2,7 +2,7 @@ __END__ =head1 NAME -Irssi.pm +Irssi =head1 DESCRIPTION @@ -83,7 +83,6 @@ For example: =head1 METHODS - =head2 Accessors =head3 C @@ -100,8 +99,12 @@ returns the currently active L in active window. =head3 C +C returns a list of all L. +When called in scalar context C, only the first +window is returned. + =head3 C returns a list of all L. @@ -383,33 +386,6 @@ Settings are a way to permanently store values that your script may wish to use. They are also easily manipulable by the user through the C command, making them a good way to allow configuration of your script. -=head3 Creating New Settings - -If a setting does not currently exist, it must first be registered with Irssi -using one of the C functions. - -=head4 C - -=head4 C - -=head4 C - -=head4 C - -=head4 C - -=head4 C - -Each of the above functions operates in the same way, but creates a different -data type. For each function, C<$section> is a string describing the -group the entry falls into, C<$key> is the name of the setting. The key must -be a single string, and typically multiple words are separated by underscores. - -The final parameter, C<$def>, is the default value of this setting. It should -correspond to the type of the setting being created. - -B - The following list summarises the data types available: =over @@ -444,9 +420,10 @@ B The value is stored internally as a number of milliseconds. Since it is stored as an C, it will overflow at 2^31 ms, or approximately 24 days. - Times longer than this are considered invalid. +The default specifier if none are specified is I. + =item C An irssi Messagelevel. See C for a full list and description, or @@ -461,6 +438,34 @@ scheme, rather than the decimal C<$x * 1000> system. =back +=head3 Creating New Settings + +If a setting does not currently exist, it must first be registered with Irssi +using one of the C functions. + +=head4 C + +=head4 C + +=head4 C + +=head4 C + +=head4 C + +=head4 C + +Each of the above functions operates in the same way, but creates a different +data type. For each function, C<$section> is a string describing the +group the entry falls into, C<$key> is the name of the setting. The key must +be a single string, and typically multiple words are separated by underscores. + +The final parameter, C<$def>, is the default value of this setting. It should +correspond to the type of the setting being created. + +B + + =head3 Retrieving Settings =head4 C diff --git a/docs/Signals.pod b/docs/Signals.pod index f3d18b9..f12dd7f 100644 --- a/docs/Signals.pod +++ b/docs/Signals.pod @@ -2089,6 +2089,9 @@ B =back +B =over diff --git a/history-search/rl_history_search.pl b/history-search/rl_history_search.pl index 09493f9..83ff934 100644 --- a/history-search/rl_history_search.pl +++ b/history-search/rl_history_search.pl @@ -212,6 +212,7 @@ sub handle_keypress { } update_history_matches(); update_history_prompt(); + update_input(); Irssi::signal_stop(); return; diff --git a/prompt_info/prompt_info.pl b/prompt_info/prompt_info.pl index aa52a81..342b62c 100644 --- a/prompt_info/prompt_info.pl +++ b/prompt_info/prompt_info.pl @@ -44,6 +44,8 @@ Irssi::expando_create('prompt_additional', \&expando_prompt, {}); sub expando_prompt { my ($server, $witem, $arg) = @_; return $prompt_additional_content; + #return Irssi::current_theme->format_expand("{sb + #$prompt_additional_content}", 0x0f); } sub redraw_prompts { diff --git a/test/irssi/config b/test/irssi/config index 6b46771..1e0d97c 100644 --- a/test/irssi/config +++ b/test/irssi/config @@ -278,13 +278,6 @@ keyboard = ( 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/test/irssi/default.theme b/test/irssi/default.theme index 357a98e..a5471c8 100644 --- a/test/irssi/default.theme +++ b/test/irssi/default.theme @@ -250,7 +250,7 @@ abstracts = { # default background for all statusbars. You can also give # the default foreground color for statusbar items. - sb_background = "%5%w"; + sb_background = "%0%w"; # default backround for "default" statusbar group #sb_default_bg = "%4"; -- cgit v1.2.3