Add option to hide duplicates count
This commit is contained in:
		
							parent
							
								
									40905c9ff8
								
							
						
					
					
						commit
						30085f7abd
					
				| @ -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); | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Moritz Luedecke
						Moritz Luedecke