removed -msg option
This commit is contained in:
		
							parent
							
								
									916a2c0c60
								
							
						
					
					
						commit
						1f67c51cf2
					
				
							
								
								
									
										7
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								README
									
									
									
									
									
								
							| @ -10,8 +10,8 @@ SYNOPSIS | |||||||
|        modifier] [-mon n] |        modifier] [-mon n] | ||||||
| 
 | 
 | ||||||
| DESCRIPTION | DESCRIPTION | ||||||
|        dunst is a lightweight notification-daemon for the libnotify. It can also be used as a standalone notification system. Dnotify displays messages received via dbus or as commandline argu‐ |        dunst is a lightweight notification-daemon for the libnotify. Dnotify displays messages received via dbus or as commandline argument in a fashion similar to dmenu and additionally prints | ||||||
|        ment in a fashion similar to dmenu and additionally prints them to stdout. Notifications can be closed via mouseclick. |        them to stdout. Notifications can be closed via mouseclick. | ||||||
| 
 | 
 | ||||||
| OPTIONS | OPTIONS | ||||||
|        -h/--help |        -h/--help | ||||||
| @ -38,9 +38,6 @@ OPTIONS | |||||||
|        -cf color |        -cf color | ||||||
|               defines the forground color for critical messages. |               defines the forground color for critical messages. | ||||||
| 
 | 
 | ||||||
|        -msg msg |  | ||||||
|               display msg instead of listening to notifications. This option can be used multiple times. |  | ||||||
| 
 |  | ||||||
|        -to secs |        -to secs | ||||||
|               timeout for messages with low and normal urgency. Messages with a timeout of 0 will not dissappear automaticly (defaults to 10) |               timeout for messages with low and normal urgency. Messages with a timeout of 0 will not dissappear automaticly (defaults to 10) | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dunst.1
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								dunst.1
									
									
									
									
									
								
							| @ -38,7 +38,7 @@ dunst \- dmenu\-ish universal notification system | |||||||
| .P | .P | ||||||
| .SH DESCRIPTION | .SH DESCRIPTION | ||||||
| .B dunst  | .B dunst  | ||||||
| is a lightweight notification\-daemon for the libnotify. It can also be used as a standalone notification system. Dnotify displays messages received via dbus or as commandline argument in a fashion similar to dmenu and additionally prints them to stdout. Notifications can be closed via mouseclick. | is a lightweight notification\-daemon for the libnotify. Dnotify displays messages received via dbus or as commandline argument in a fashion similar to dmenu and additionally prints them to stdout. Notifications can be closed via mouseclick. | ||||||
| .SH OPTIONS | .SH OPTIONS | ||||||
| .TP | .TP | ||||||
| .B \-h/\-\-help	 | .B \-h/\-\-help	 | ||||||
| @ -65,9 +65,6 @@ defines the background color for critical messages. | |||||||
| .BI \-cf " color" | .BI \-cf " color" | ||||||
| defines the forground color for critical messages. | defines the forground color for critical messages. | ||||||
| .TP | .TP | ||||||
| .BI \-msg " msg" |  | ||||||
| display msg instead of listening to notifications. This option can be used multiple times. |  | ||||||
| .TP |  | ||||||
| .BI \-to " secs" | .BI \-to " secs" | ||||||
| timeout for messages with low and normal urgency. Messages with a timeout of 0 will not dissappear automaticly (defaults to 10) | timeout for messages with low and normal urgency. Messages with a timeout of 0 will not dissappear automaticly (defaults to 10) | ||||||
| .TP | .TP | ||||||
|  | |||||||
							
								
								
									
										21
									
								
								dunst.c
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								dunst.c
									
									
									
									
									
								
							| @ -62,7 +62,6 @@ static Window win; | |||||||
| static double timeouts[] = { 10, 10, 0 }; | static double timeouts[] = { 10, 10, 0 }; | ||||||
| static msg_queue_t *msgqueue = NULL; | static msg_queue_t *msgqueue = NULL; | ||||||
| static time_t now; | static time_t now; | ||||||
| static int listen_to_dbus = True; |  | ||||||
| static int visible = False; | static int visible = False; | ||||||
| static KeySym key = NoSymbol; | static KeySym key = NoSymbol; | ||||||
| static KeySym mask = 0; | static KeySym mask = 0; | ||||||
| @ -487,18 +486,12 @@ run(void) { | |||||||
| 
 | 
 | ||||||
|     while(True) { |     while(True) { | ||||||
|         /* dbus_poll blocks for max 2 seconds, if no events are present */ |         /* dbus_poll blocks for max 2 seconds, if no events are present */ | ||||||
|         if(listen_to_dbus) { |         dbus_poll(); | ||||||
|             dbus_poll(); |  | ||||||
|         } else { |  | ||||||
|             usleep(1000*50); |  | ||||||
|         } |  | ||||||
|         now = time(&now); |         now = time(&now); | ||||||
|         if(msgqueue != NULL) { |         if(msgqueue != NULL) { | ||||||
|             show_win(); |             show_win(); | ||||||
|             check_timeouts(); |             check_timeouts(); | ||||||
|             handleXEvents(); |             handleXEvents(); | ||||||
|         } else if (!listen_to_dbus) { |  | ||||||
|             break; |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -589,6 +582,7 @@ main(int argc, char *argv[]) { | |||||||
|     int i; |     int i; | ||||||
| 
 | 
 | ||||||
|     now = time(&now); |     now = time(&now); | ||||||
|  |     dc = initdc(); | ||||||
| 
 | 
 | ||||||
|     for(i = 1; i < argc; i++) { |     for(i = 1; i < argc; i++) { | ||||||
|         /* switches */ |         /* switches */ | ||||||
| @ -627,10 +621,6 @@ main(int argc, char *argv[]) { | |||||||
|             timeouts[1] = atoi(argv[++i]); |             timeouts[1] = atoi(argv[++i]); | ||||||
|         else if(!strcmp(argv[i], "-cto")) |         else if(!strcmp(argv[i], "-cto")) | ||||||
|             timeouts[2] = atoi(argv[++i]); |             timeouts[2] = atoi(argv[++i]); | ||||||
|         else if(!strcmp(argv[i], "-msg")) { |  | ||||||
|              msgqueue = append(msgqueue, strdup(argv[++i]), -1, 1, NULL, NULL); |  | ||||||
|              listen_to_dbus = False; |  | ||||||
|         } |  | ||||||
|         else if(!strcmp(argv[i], "-mon")) { |         else if(!strcmp(argv[i], "-mon")) { | ||||||
|             scr.scr = atoi(argv[++i]); |             scr.scr = atoi(argv[++i]); | ||||||
|         } |         } | ||||||
| @ -676,10 +666,7 @@ main(int argc, char *argv[]) { | |||||||
|             usage(EXIT_FAILURE); |             usage(EXIT_FAILURE); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if(listen_to_dbus) { |     initdbus(); | ||||||
|         initdbus(); |  | ||||||
|     } |  | ||||||
|     dc = initdc(); |  | ||||||
|     initfont(dc, font); |     initfont(dc, font); | ||||||
|     setup(); |     setup(); | ||||||
|     if(msgqueue != NULL) { |     if(msgqueue != NULL) { | ||||||
| @ -691,6 +678,6 @@ main(int argc, char *argv[]) { | |||||||
| 
 | 
 | ||||||
| void | void | ||||||
| usage(int exit_status) { | usage(int exit_status) { | ||||||
|     fputs("usage: dunst [-h/--help] [-geometry geom] [-fn font] [-format fmt]\n[-nb color] [-nf color] [-lb color] [-lf color] [-cb color] [ -cf color]\n[-to secs] [-lto secs] [-cto secs] [-nto secs] [-key key] [-mod modifier] [-mon n] [-msg msg]\n", stderr); |     fputs("usage: dunst [-h/--help] [-geometry geom] [-fn font] [-format fmt]\n[-nb color] [-nf color] [-lb color] [-lf color] [-cb color] [ -cf color]\n[-to secs] [-lto secs] [-cto secs] [-nto secs] [-key key] [-mod modifier] [-mon n]\n", stderr); | ||||||
|     exit(exit_status); |     exit(exit_status); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse