diff --git a/notification.c b/notification.c index b170977..da3c80a 100644 --- a/notification.c +++ b/notification.c @@ -586,8 +586,8 @@ void notification_update_text_to_render(notification *n) char *msg = g_strstrip(n->msg); /* print dup_count and msg */ - if (n->dup_count > 0 && (n->actions || n->urls) - && settings.show_indicators) { + if ((n->dup_count > 0 && !settings.hide_duplicates_count) + && (n->actions || n->urls) && settings.show_indicators) { buf = g_strdup_printf("(%d%s%s) %s", n->dup_count, n->actions ? "A" : "", @@ -596,7 +596,7 @@ void notification_update_text_to_render(notification *n) buf = g_strdup_printf("(%s%s) %s", n->actions ? "A" : "", n->urls ? "U" : "", msg); - } else if (n->dup_count > 0) { + } else if (n->dup_count > 0 && !settings.hide_duplicates_count) { buf = g_strdup_printf("(%d) %s", n->dup_count, msg); } else { buf = g_strdup(msg); diff --git a/settings.c b/settings.c index e8d4cd3..ae0c14c 100644 --- a/settings.c +++ b/settings.c @@ -171,6 +171,10 @@ void load_settings(char *cmdline_config_path) option_get_int("global", "show_age_threshold", "-show_age_threshold", show_age_threshold, "When should the age of the notification be displayed?"); + settings.hide_duplicates_count = + option_get_bool("global", "hide_duplicates_count", + "-hide_duplicates_count", false, + "Hide count of the merged notifications with the same content"); settings.sticky_history = option_get_bool("global", "sticky_history", "-sticky_history", sticky_history, diff --git a/settings.h b/settings.h index f5b8a0a..fec97a3 100644 --- a/settings.h +++ b/settings.h @@ -6,6 +6,7 @@ typedef struct _settings { bool allow_markup; bool plain_text; bool stack_duplicates; + bool hide_duplicates_count; char *font; char *normbgcolor; char *normfgcolor;