Merge pull request #830 from tsipinakis/drop-commands

Drop support for DUNST_COMMAND_*
This commit is contained in:
Nikos Tsipinakis 2021-02-20 16:11:07 +02:00 committed by GitHub
commit 399489567c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 13 deletions

View File

@ -452,6 +452,12 @@ void notification_init(struct notification *n)
/* Process rules */
rule_apply_all(n);
if (g_str_has_prefix(n->summary, "DUNST_COMMAND_")) {
char *msg = "DUNST_COMMAND_* has been removed, please switch to dunstctl. See #830 for more details. https://github.com/dunst-project/dunst/pull/830";
LOG_W(msg);
n->body = string_append(n->body, msg, "\n");
}
/* UPDATE derived fields */
notification_extract_urls(n);
notification_format_message(n);

View File

@ -168,19 +168,6 @@ int queues_notification_insert(struct notification *n)
LOG_M("Skipping notification: '%s' '%s'", n->body, n->summary);
return 0;
}
/* Do not insert the message if it's a command */
if (STR_EQ("DUNST_COMMAND_PAUSE", n->summary)) {
dunst_status(S_RUNNING, false);
return 0;
}
if (STR_EQ("DUNST_COMMAND_RESUME", n->summary)) {
dunst_status(S_RUNNING, true);
return 0;
}
if (STR_EQ("DUNST_COMMAND_TOGGLE", n->summary)) {
dunst_status(S_RUNNING, !dunst_status_get().running);
return 0;
}
bool inserted = false;
if (n->id != 0) {