aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-19 13:04:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-23 05:17:21 +0000
commitb0bf8ca5f7034f6d95bc3b58082e719a81d99859 (patch)
tree038d7f081038f8c71a98e93e5c31dcad874ff9fc /config.c
parentinput: allow mouse selections to start inside the margins (diff)
osc/notify: add support for OSC-99, kitty desktop notifications
This adds limited support for OSC-99, kitty desktop notifications[^1]. We support everything defined by the "protocol", except: * 'a': action to perform on notification activation. Since we don't trigger the notification ourselves (over D-Bus), we don't know a) which ID the notification got, or b) when it is clicked. * ... and that's it. Everything else is supported To be explicit, we *do* support: * Chunked notifications (d=0|1), allowing the application to append data to a notification in chunks, before it's finally displayed. * Plain UTF-8, or base64-encoded UTF-8 payload (e=0|1). * Notification identifier (i=xyz). * Payload type (p=title|body). * When to honor the notification (o=always|unfocused|invisible), with the following quirks: - we don't know when the window is invisible, thus it's treated as 'unfocused'. - the foot option 'notify-focus-inhibit' overrides 'always' * Urgency (u=0|1|2) [^1]: https://sw.kovidgoyal.net/kitty/desktop-notifications/
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/config.c b/config.c
index 5d9a0b75..d34df132 100644
--- a/config.c
+++ b/config.c
@@ -3184,8 +3184,9 @@ config_load(struct config *conf, const char *conf_path,
memcpy(conf->colors.table, default_color_table, sizeof(default_color_table));
parse_modifiers(XKB_MOD_NAME_SHIFT, 5, &conf->mouse.selection_override_modifiers);
- tokenize_cmdline("notify-send -a ${app-id} -i ${app-id} ${title} ${body}",
- &conf->notify.argv.args);
+ tokenize_cmdline(
+ "notify-send -a ${app-id} -i ${app-id} -u ${urgency} ${title} ${body}",
+ &conf->notify.argv.args);
tokenize_cmdline("xdg-open ${url}", &conf->url.launch.argv.args);
static const char32_t *url_protocols[] = {