aboutsummaryrefslogtreecommitdiff
path: root/foot.ini
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-08-02 06:07:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-08-02 06:07:13 +0000
commitea2f0e7c3f29f2ba83ad71e36c6751bb571f826f (patch)
tree1669eea3bd326d1cb4c6d6e0fceba7286cf7e004 /foot.ini
parentnotify: don't forget terminating NULL when patching notify helper's argv (diff)
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If the notification ID of the 'current' notification doesn't match the previous, unfinished one, the 'current' notification replaces the previous one, instead of updating it. * Update xstrjoin() to take an optional delimiter (for example ','), and use that when joining categories and 'alive IDs'. * Rename ${action-arg} to ${action-argument} * Update handling of the 'n' parameter (symbolic icon name); the spec allows it to be used multiple times, and the terminal is supposed to pick the first one it can resolve. Foot can't resolve icons at all, neither can 'notify-send' or 'fyi' (which is what foot typically executes to display a notification); it's the notification daemon that resolves icons. The spec _could_ be interpreted to mean the terminal should lookup .desktop files, and use the value of the 'Icon' key from the first matching .desktop files. But foot doesn't read .desktop files, and I don't intend to implement XDG directory scanning and parsing of .desktop files just to figure out which icon to use. Instead, use a simple heuristics; use the *shortest* symbolic names. The idea is pretty simple: plain icon names are typically shorter than .desktop file IDs.
Diffstat (limited to 'foot.ini')
-rw-r--r--foot.ini4
1 files changed, 2 insertions, 2 deletions
diff --git a/foot.ini b/foot.ini
index 0ae0b52f..029daa9b 100644
--- a/foot.ini
+++ b/foot.ini
@@ -47,8 +47,8 @@
# command-focused=no
[desktop-notifications]
-# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-arg} --print-id -- ${title} ${body}
-# command-action-arg=--action ${action-name}=${action-label}
+# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
+# command-action-argument=--action ${action-name}=${action-label}
# close=""
# inhibit-when-focused=yes