aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-23 14:41:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-23 14:41:52 +0000
commit045ead985c1e320f289704b6a995d48a5eccf59e (patch)
treede93e855fac767681e1976ec7a369be30633e4a1 /doc
parentnotify: if there's a symbolic icon name, use it (diff)
notify: don't focus/report on notification dismissal
Only do it when the notification was activated. Here, activated means the 'click to activate' notification action was triggered. How do we tie everything together? First, we add a new template parameter, ${action}. It's intended to be used with e.g. notify-send's --action option. When the action is triggered, notify-send prints its name on stdout, on a separate line. Look for this in stdout. Only if we've seen it do we focus/report the notification.
Diffstat (limited to 'doc')
-rw-r--r--doc/foot.ini.5.scd31
1 files changed, 26 insertions, 5 deletions
diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd
index 5135e080..8e388107 100644
--- a/doc/foot.ini.5.scd
+++ b/doc/foot.ini.5.scd
@@ -462,11 +462,32 @@ Note: do not set *TERM* here; use the *term* option in the main
behavior depends on the notification daemon in use, and how it
has been configured.
- For this to work, foot needs an XDG activation token. To this
- end, foot will read the command's stdout; a line prefixed with
- *xdgtoken=* will be recognized as containing the XDG
- activation token:
+ For this to work, foot needs to know when the notification was
+ activated (as opposed to just dismissed), and it needs an XDG
+ activation token.
+ There are two parts to handle this. First, the notification
+ must define an action. For this purpose, foot definse the
+ template parameter *${action}*. It is intended to be used with
+ e.g. notify-send's *-A,--action* option. The contents of
+ *${action}* is not configurable, but will be on the form
+ 'name=label', where name is a notification internal reference
+ to the action, and label is what is displayed in the
+ notification.
+
+ Second, foot needs to know when the notification activated,
+ and it needs to get hold of the XDG activation token.
+
+ Both are expected to be printed on stdout.
+
+ Foot expects the action name (not label) to be printed on a
+ single line. No prefix, no postfix.
+
+ Foot expects the activation token to be printed on a single
+ line, prefixed with *xdgtoken=*.
+
+ Example:
+ activate-foot
xdgtoken=18179adf579a7a904ce73754964b1ec3
The expected format of stdout may change at any time. Please
@@ -491,7 +512,7 @@ Note: do not set *TERM* here; use the *term* option in the main
For *notify-send*, this can be achieved with the *--wait*
option.
- Default: _notify-send --wait --app-name ${app-id} --icon ${icon} --urgency ${urgency} -- ${title} ${body}_.
+ Default: _notify-send --wait --app-name ${app-id} --icon ${icon} --urgency ${urgency} --action ${action} -- ${title} ${body}_.
*inhibit-when-focused*
Boolean. If enabled, foot will not display notifications if the