From fcd794df6a428f7e15308eb00ee662d553c82f2f Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sun, 1 Jul 2012 02:11:17 +0200 Subject: [PATCH] new option for sticky history --- dunst.c | 6 ++++++ dunstrc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/dunst.c b/dunst.c index efcb3ed..327927f 100644 --- a/dunst.c +++ b/dunst.c @@ -71,6 +71,7 @@ KeySym mask = 0; int idle_threshold = 0; int show_age_threshold = -1; enum alignment align = left; +int sticky_history = True; int verbosity = 0; @@ -603,6 +604,9 @@ void history_pop(void) data = (notification *) iter->data; data->redisplayed = True; data->start = 0; + if (sticky_history) { + data->timeout = 0; + } l_move(notification_history, notification_queue, iter); if (!visible) { @@ -1123,6 +1127,8 @@ dunst_ini_handle(void *user_data, const char *section, /* FIXME warning on unknown alignment */ } else if (strcmp(name, "show_age_threshold") == 0) show_age_threshold = atoi(value); + else if (strcmp(name, "sticky_history") == 0) + sticky_history = dunst_ini_get_boolean(value); } else if (strcmp(section, "urgency_low") == 0) { if (strcmp(name, "background") == 0) lowbgcolor = dunst_ini_get_string(value); diff --git a/dunstrc b/dunstrc index 8e8599f..0bf8bc9 100644 --- a/dunstrc +++ b/dunstrc @@ -53,6 +53,10 @@ # Which monitor should the notifications be displayed one monitor = 0 + # should a notification popped up from history be sticky or + # timeout as if it would normally down + sticky_history = yes + [urgency_low] # IMPORTANT: colors have to be defined in quotation marks.