new option: igonre_newline
see github issue 83
This commit is contained in:
		
							parent
							
								
									414d3d056a
								
							
						
					
					
						commit
						a51f564037
					
				| @ -22,6 +22,7 @@ float bounce_freq = 1;          /* determines the bounce frequency (if activated | ||||
| int sticky_history = True; | ||||
| int verbosity = 0; | ||||
| int word_wrap = False; | ||||
| int ignore_newline = False; | ||||
| int line_height = 0;   /* if line height < font height, it will be raised to font height */ | ||||
| 
 | ||||
| int separator_height = 2; /* height of the separator line between two notifications */ | ||||
|  | ||||
							
								
								
									
										8
									
								
								dunst.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								dunst.c
									
									
									
									
									
								
							| @ -1078,6 +1078,10 @@ int init_notification(notification * n, int id) | ||||
|         while (strstr(n->msg, "\\n") != NULL) | ||||
|                 n->msg = string_replace("\\n", "\n", n->msg); | ||||
| 
 | ||||
|         if (ignore_newline) | ||||
|                 while (strstr(n->msg, "\n") != NULL) | ||||
|                         n->msg = string_replace("\n", " ", n->msg); | ||||
| 
 | ||||
|         n->msg = rstrip(n->msg); | ||||
| 
 | ||||
| 
 | ||||
| @ -1613,6 +1617,10 @@ void load_options(char *cmdline_config_path) | ||||
|         word_wrap = | ||||
|             option_get_bool("global", "word_wrap", "-word_wrap", word_wrap, | ||||
|                             "Truncating long lines or do word wrap"); | ||||
| 
 | ||||
|         ignore_newline = | ||||
|             option_get_bool("global", "ignore_newline", "-ignore_newline", | ||||
|                             ignore_newline, "Ignore newline characters in notifications"); | ||||
|         idle_threshold = | ||||
|             option_get_int("global", "idle_threshold", "-idle_threshold", | ||||
|                            idle_threshold, | ||||
|  | ||||
							
								
								
									
										5
									
								
								dunstrc
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								dunstrc
									
									
									
									
									
								
							| @ -30,9 +30,12 @@ | ||||
|     # set to -1 to disable | ||||
|     show_age_threshold = 60; | ||||
| 
 | ||||
|     # split long notifications into multiple lines | ||||
|     # split notifications into multiple lines if they don't fit into geometry | ||||
|     word_wrap = yes | ||||
| 
 | ||||
|     # ignore newlines '\n' in notifications | ||||
|     ignore_newline = no | ||||
| 
 | ||||
| 
 | ||||
|     # the geometry of the window | ||||
|     # geometry [{width}]x{height}][+/-{x}+/-{y}] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse