aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--notify.c3
-rw-r--r--osc.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/notify.c b/notify.c
index 58388b1c..c77c0606 100644
--- a/notify.c
+++ b/notify.c
@@ -473,7 +473,8 @@ notify_notify(struct terminal *term, struct notification *notif)
"urgency", "muted", "sound-name", "expire-time", "replace-id",
"action-argument"},
(const char *[]){
- app_id, term->window_title, icon_name_or_path, title, body,
+ app_id, term->window_title, icon_name_or_path, title,
+ body != NULL ? body : "",
notif->category != NULL ? notif->category : "", urgency_str,
notif->muted ? "true" : "false",
notif->sound_name != NULL ? notif->sound_name : "",
diff --git a/osc.c b/osc.c
index 5efc7588..535e29c8 100644
--- a/osc.c
+++ b/osc.c
@@ -557,9 +557,13 @@ osc_notify(struct terminal *term, char *string)
return;
}
+ char *msgdup = NULL;
+ if (msg != NULL)
+ msgdup = xstrdup(msg);
+
notify_notify(term, &(struct notification){
.title = xstrdup(title),
- .body = xstrdup(msg),
+ .body = msgdup,
.expire_time = -1,
.focus = true,
});