aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-23 10:12:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-23 10:12:38 +0000
commitefa5b9cea639f08ef2b9a9eb0ce6179af98ebd80 (patch)
tree9ad15b8060e169252fa535e450d1e186b7fb5e67
parentnotify: separate active notifications from unfinished kitty notifications (diff)
osc: cleanup
-rw-r--r--osc.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/osc.c b/osc.c
index 41a0dc68..4fde951c 100644
--- a/osc.c
+++ b/osc.c
@@ -644,7 +644,7 @@ kitty_notification(struct terminal *term, char *string)
break;
case 'e':
- /* base64: 0=utf8, 1=base64(utf8) */
+ /* base64 (payload encoding): 0=utf8, 1=base64(utf8) */
if (value[0] == '0' && value[1] == '\0')
base64 = false;
else if (value[0] == '1' && value[1] == '\0')
@@ -690,11 +690,13 @@ kitty_notification(struct terminal *term, char *string)
break;
case 'g':
+ /* graphical ID */
free(icon_id);
icon_id = xstrdup(value);
break;
case 'n':
+ /* Symbolic icon name, used with 'g' */
free(symbolic_icon);
symbolic_icon = xstrdup(value);
break;
@@ -710,21 +712,6 @@ kitty_notification(struct terminal *term, char *string)
payload_size = strlen(payload);
}
- LOG_DBG("id=%s, done=%d, focus=%d, report=%d, base64=%d, icon=%s, payload: %s, "
- "honor: %s, urgency: %s, %s: %s",
- id, done, focus, report, base64, icon != NULL ? icon : "<not set>",
- payload_is_title ? "title" : "body",
- (when == NOTIFY_ALWAYS
- ? "always"
- : when == NOTIFY_UNFOCUSED
- ? "unfocused"
- : "invisible"),
- (urgency == NOTIFY_URGENCY_LOW
- ? "low" : urgency == NOTIFY_URGENCY_NORMAL
- ? "normal"
- : "critical"),
- payload_is_title ? "title" : "body", payload);
-
/* Search for an existing (d=0) notification to update */
struct notification *notif = NULL;
tll_foreach(term->kitty_notifications, it) {