summaryrefslogtreecommitdiffstats
path: root/weechat
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-11-02 22:18:21 -0400
committerJesse Luehrs <doy@tozt.net>2014-01-02 16:42:22 -0500
commit4f4c8a8425fbda4eabcf8ff5f169b94515dad840 (patch)
tree1f22582f5ee190d0bced3f2be2df03d43801a05e /weechat
parentf8753712c9a35b917219df1181201183189421d2 (diff)
downloadconf-4f4c8a8425fbda4eabcf8ff5f169b94515dad840.tar.gz
conf-4f4c8a8425fbda4eabcf8ff5f169b94515dad840.zip
re-add my buffers.pl edits
Diffstat (limited to 'weechat')
-rw-r--r--weechat/perl/autoload/buffers.pl22
1 files changed, 15 insertions, 7 deletions
diff --git a/weechat/perl/autoload/buffers.pl b/weechat/perl/autoload/buffers.pl
index e2b49e5..bbda110 100644
--- a/weechat/perl/autoload/buffers.pl
+++ b/weechat/perl/autoload/buffers.pl
@@ -930,32 +930,40 @@ sub build_buffers
if (weechat::config_boolean( $options{"short_names"} ) eq 1)
{
+ my $name = $buffer->{"short_name"};
+ $name = '?' . $name if $buffer->{"type"} eq 'private';
+ $name =~ s|#iinteractive/|#|;
+
if (weechat::config_integer($options{"name_size_max"}) >= 1) # check max_size of buffer name
{
- $str .= encode("UTF-8", substr(decode("UTF-8", $buffer->{"short_name"}), 0, weechat::config_integer($options{"name_size_max"})));
- $str .= weechat::color(weechat::config_color( $options{"color_number_char"})).weechat::config_string($options{"name_crop_suffix"}) if (length($buffer->{"short_name"}) > weechat::config_integer($options{"name_size_max"}));
+ $str .= encode("UTF-8", substr(decode("UTF-8", $name), 0, weechat::config_integer($options{"name_size_max"})));
+ $str .= weechat::color(weechat::config_color( $options{"color_number_char"})).weechat::config_string($options{"name_crop_suffix"}) if (length($name) > weechat::config_integer($options{"name_size_max"}));
$str .= add_inactive_parentless($buffer->{"type"},$buffer->{"nicks_count"});
$str .= add_hotlist_count($buffer->{"pointer"},%hotlist);
}
else
{
- $str .= $buffer->{"short_name"};
+ $str .= $name;
$str .= add_inactive_parentless($buffer->{"type"},$buffer->{"nicks_count"});
$str .= add_hotlist_count($buffer->{"pointer"},%hotlist);
}
}
else
{
+ my $name = $buffer->{"name"};
+ $name = '?' . $name if $buffer->{"type"} eq 'private';
+ $name =~ s|#iinteractive/|#|;
+
if (weechat::config_integer($options{"name_size_max"}) >= 1) # check max_size of buffer name
{
- $str .= encode("UTF-8", substr(decode("UTF-8", $buffer->{"name"},), 0, weechat::config_integer($options{"name_size_max"})));
- $str .= weechat::color(weechat::config_color( $options{"color_number_char"})).weechat::config_string($options{"name_crop_suffix"}) if (length($buffer->{"name"}) > weechat::config_integer($options{"name_size_max"}));
+ $str .= encode("UTF-8", substr(decode("UTF-8", $name,), 0, weechat::config_integer($options{"name_size_max"})));
+ $str .= weechat::color(weechat::config_color( $options{"color_number_char"})).weechat::config_string($options{"name_crop_suffix"}) if (length($name) > weechat::config_integer($options{"name_size_max"}));
$str .= add_inactive_parentless($buffer->{"type"},$buffer->{"nicks_count"});
$str .= add_hotlist_count($buffer->{"pointer"},%hotlist);
}
else
{
- $str .= $buffer->{"name"};
+ $str .= $name;
$str .= add_inactive_parentless($buffer->{"type"},$buffer->{"nicks_count"});
$str .= add_hotlist_count($buffer->{"pointer"},%hotlist);
}
@@ -1283,4 +1291,4 @@ sub check_bar_item
}
weechat::infolist_free($infolist);
return $item;
-} \ No newline at end of file
+}