blob: 652384270d78107165a270506b336a9d677b3dc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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');
|