aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-12-14 00:05:02 +0100
committerTeddy Wing2023-12-14 00:08:12 +0100
commitbf1480a5e3a8d40d56250043269524c49f6b39c3 (patch)
tree0ec6585080cf4b2e271feb0c40f304ad6022b126
parent113f7c16a4eb52a2282de31d55b46fc50505d3bb (diff)
downloadweechat-activity-bar-bf1480a5e3a8d40d56250043269524c49f6b39c3.tar.bz2
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.
-rw-r--r--activity_bar.pl9
1 files 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');
}