From bf1480a5e3a8d40d56250043269524c49f6b39c3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 14 Dec 2023 00:05:02 +0100 Subject: activity_bar.pl: Don't notify about messages in "core.weechat" buffer We really only care about messages from other people, so don't bother notifying when messages are added to the WeeChat core buffer. --- activity_bar.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/activity_bar.pl b/activity_bar.pl index 37b2aac..4c41e4c 100644 --- a/activity_bar.pl +++ b/activity_bar.pl @@ -84,6 +84,7 @@ sub print_cb { my $buffer_type = weechat::buffer_get_string($buffer, 'localvar_type'); my $buffer_notify = weechat::buffer_get_integer($buffer, 'notify'); + my $buffer_full_name = weechat::buffer_get_string($buffer, 'full_name'); if ($buffer_type eq 'private') { anybar_send('orange'); @@ -92,8 +93,12 @@ sub print_cb { anybar_send('purple'); } - # Notify about regular messages if the buffer's `notify` property allows it. - elsif ($buffer_notify > 1) { + # Notify about regular messages if the buffer's `notify` property allows + # it. Don't notify about messages in the WeeChat core buffer. + elsif ( + $buffer_notify > 1 + && $buffer_full_name ne 'core.weechat' + ) { anybar_send('blue'); } -- cgit v1.2.3