aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-19 13:26:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-23 05:17:21 +0000
commit57af75f98877220a2e8827bb3cb32c780df25d8d (patch)
tree818d17ee93cdede6aaae739abd0ca68f63b0794b /osc.c
parentosc/notify: add support for OSC-99, kitty desktop notifications (diff)
osc: kitty notifications: use body as title, if no title is set
This mirrors kitty's behavior; if the user didn't set a title, but did set the body/text, use the body as title instead.
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/osc.c b/osc.c
index a9a83df9..7485cada 100644
--- a/osc.c
+++ b/osc.c
@@ -790,8 +790,8 @@ kitty_notification(struct terminal *term, char *string)
if (done) {
notify_notify(
term,
- notif->title != NULL ? notif->title : "",
- notif->body != NULL ? notif->body : "",
+ notif->title != NULL ? notif->title : notif->body,
+ notif->title != NULL && notif->body != NULL ? notif->body : "",
notif->when, notif->urgency);
tll_foreach(term->kitty_notifications, it) {