print notification on startup
This commit is contained in:
parent
43b2b3bb1d
commit
3918fd32a8
@ -27,6 +27,12 @@ int line_height = 0; /* if line height < font height, it will be raised to fon
|
|||||||
int separator_height = 2; /* height of the separator line between two notifications */
|
int separator_height = 2; /* height of the separator line between two notifications */
|
||||||
enum separator_color sep_color = AUTO; /* AUTO or FOREGROUND */
|
enum separator_color sep_color = AUTO; /* AUTO or FOREGROUND */
|
||||||
|
|
||||||
|
/* show a notification on startup
|
||||||
|
* This is mainly for crash detection since dbus restarts dunst
|
||||||
|
* automatically after a crash, so crashes might get unnotices otherwise
|
||||||
|
* */
|
||||||
|
int startup_notification = False;
|
||||||
|
|
||||||
|
|
||||||
/* monitor to display notifications on */
|
/* monitor to display notifications on */
|
||||||
int monitor = 0;
|
int monitor = 0;
|
||||||
|
17
dunst.c
17
dunst.c
@ -1438,6 +1438,9 @@ void load_options(char *cmdline_config_path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startup_notification = option_get_bool("global", "startup_notification",
|
||||||
|
"-startup_notification", false, "print notification on startup");
|
||||||
|
|
||||||
lowbgcolor =
|
lowbgcolor =
|
||||||
option_get_string("urgency_low", "background", "-lb", lowbgcolor,
|
option_get_string("urgency_low", "background", "-lb", lowbgcolor,
|
||||||
"Background color for notifcations with low urgency");
|
"Background color for notifcations with low urgency");
|
||||||
@ -1581,6 +1584,20 @@ int main(int argc, char *argv[])
|
|||||||
signal (SIGUSR1, pause_signal_handler);
|
signal (SIGUSR1, pause_signal_handler);
|
||||||
signal (SIGUSR2, pause_signal_handler);
|
signal (SIGUSR2, pause_signal_handler);
|
||||||
|
|
||||||
|
if (startup_notification) {
|
||||||
|
notification *n = malloc(sizeof (notification));
|
||||||
|
n->appname = "dunst";
|
||||||
|
n->summary = "startup";
|
||||||
|
n->body = "dunst is up and running";
|
||||||
|
n->urgency = LOW;
|
||||||
|
n->icon = NULL;
|
||||||
|
n->msg = NULL;
|
||||||
|
n->dbus_client = NULL;
|
||||||
|
n->color_strings[0] = NULL;
|
||||||
|
n->color_strings[1] = NULL;
|
||||||
|
init_notification(n, 0);
|
||||||
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
4
dunstrc
4
dunstrc
@ -89,6 +89,10 @@
|
|||||||
# that fits nicely to the background color.
|
# that fits nicely to the background color.
|
||||||
separator_color = auto
|
separator_color = auto
|
||||||
|
|
||||||
|
# print a notification on startup
|
||||||
|
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||||
|
# automatically after a crash.
|
||||||
|
startup_notification = false
|
||||||
|
|
||||||
[shortcuts]
|
[shortcuts]
|
||||||
# shortcuts are specified as [modifier+][modifier+]...key
|
# shortcuts are specified as [modifier+][modifier+]...key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user