From 2baff3c74a078443058828e4a01a32fbec9285b5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 12 Dec 2023 20:11:50 +0100 Subject: activity_bar.pl: Don't show activity for messages below notify level If a message comes in on a buffer whose notify level is set to highlights and higher, then don't update AnyBar activity. We should only be changing the AnyBar colour when we receive messages that we want to be notified of based on our configuration. --- activity_bar.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activity_bar.pl b/activity_bar.pl index c3f52cb..fdb02f8 100644 --- a/activity_bar.pl +++ b/activity_bar.pl @@ -72,6 +72,7 @@ sub print_cb { my ($data, $buffer, $date, $tags, $displayed, $highlight, $prefix, $message) = @_; my $buffer_type = weechat::buffer_get_string($buffer, 'localvar_type'); + my $buffer_notify = weechat::buffer_get_integer($buffer, 'notify'); if ($buffer_type eq 'private') { anybar_send('blue'); @@ -79,7 +80,9 @@ sub print_cb { elsif ($highlight == 1) { anybar_send('purple'); } - else { + + # Notify about regular messages if the buffer's `notify` property allows it. + elsif ($buffer_notify > 1) { anybar_send('orange'); } -- cgit v1.2.3