new option for sticky history

This commit is contained in:
Sascha Kruse 2012-07-01 02:11:17 +02:00
parent 97bc600884
commit fcd794df6a
2 changed files with 10 additions and 0 deletions

View File

@ -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);

View File

@ -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.