From c252c3084bd5dabc1c02a4abec79b8be9189692d Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 31 Jul 2010 04:45:29 +0100 Subject: initial add of mirc_colour_popup.pl --- feature-tests/sbar_test.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 feature-tests/sbar_test.pl (limited to 'feature-tests') diff --git a/feature-tests/sbar_test.pl b/feature-tests/sbar_test.pl new file mode 100644 index 0000000..6523842 --- /dev/null +++ b/feature-tests/sbar_test.pl @@ -0,0 +1,31 @@ + +use strict; +use warnings; + +use Irssi; +use Irssi::TextUI; # for sbar_items_redraw + + +sub foo_sb { + my ($sb_item, $get_size_only) = @_; + + # my $prompt = Irssi::parse_special('$L'); + # my $cmdchars = Irssi::parse_special('$K'); + + # my $sb = ''; + + # if ($prompt =~ /^(.)ws (.+)$/i && index($cmdchars,$1) != -1) { + # my $arg = $2; + # my $wins = find_wins($arg); + + # foreach my $win (@$wins) { + # $sb .= $win->{text} . ' '; + # } + # $sb =~ s/ $//; + # } + my $sb = '%gmoo%n'; + print "Getsize: $get_size_only"; + $sb_item->default_handler($get_size_only, "{sb $sb}", '', 0); +} + +Irssi::statusbar_item_register ('foo_bar', 0, 'foo_sb'); -- cgit v1.2.3