mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
Merge branch 'app-id-in-notify'
This commit is contained in:
commit
ef4dc4bb7c
5 changed files with 8 additions and 6 deletions
|
|
@ -84,6 +84,8 @@
|
||||||
* `ctrl + w` (_extend-to-word-boundary_) can now be used across lines
|
* `ctrl + w` (_extend-to-word-boundary_) can now be used across lines
|
||||||
(https://codeberg.org/dnkl/foot/issues/421).
|
(https://codeberg.org/dnkl/foot/issues/421).
|
||||||
* Ignore auto-detected URLs that overlap with OSC-8 URLs.
|
* Ignore auto-detected URLs that overlap with OSC-8 URLs.
|
||||||
|
* Default value for the `notify` option to use `-a ${app-id} -i
|
||||||
|
${app-id} ...` instead of `-a foot -i foot ...`.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
|
||||||
2
config.c
2
config.c
|
|
@ -2574,7 +2574,7 @@ config_load(struct config *conf, const char *conf_path,
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->notify.raw_cmd = xstrdup(
|
conf->notify.raw_cmd = xstrdup(
|
||||||
"notify-send -a foot -i foot ${title} ${body}");
|
"notify-send -a ${app-id} -i ${app-id} ${title} ${body}");
|
||||||
tokenize_cmdline(conf->notify.raw_cmd, &conf->notify.argv);
|
tokenize_cmdline(conf->notify.raw_cmd, &conf->notify.argv);
|
||||||
|
|
||||||
conf->url.launch.raw_cmd = xstrdup("xdg-open ${url}");
|
conf->url.launch.raw_cmd = xstrdup("xdg-open ${url}");
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ in this order:
|
||||||
Notifications are *inhibited* if the foot window has keyboard
|
Notifications are *inhibited* if the foot window has keyboard
|
||||||
focus.
|
focus.
|
||||||
|
|
||||||
Default: _notify-send -a foot -i foot ${title} ${body}_.
|
Default: _notify-send -a ${app-id} -i ${app-id} ${title} ${body}_.
|
||||||
|
|
||||||
*selection-target*
|
*selection-target*
|
||||||
Clipboard target to automatically copy selected text to. One of
|
Clipboard target to automatically copy selected text to. One of
|
||||||
|
|
|
||||||
2
foot.ini
2
foot.ini
|
|
@ -21,7 +21,7 @@
|
||||||
# pad=2x2 # optionally append 'center'
|
# pad=2x2 # optionally append 'center'
|
||||||
# resize-delay-ms=100
|
# resize-delay-ms=100
|
||||||
|
|
||||||
# notify=notify-send -a foot -i foot ${title} ${body}
|
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
||||||
|
|
||||||
# bold-text-in-bright=no
|
# bold-text-in-bright=no
|
||||||
# bell=none
|
# bell=none
|
||||||
|
|
|
||||||
6
notify.c
6
notify.c
|
|
@ -34,9 +34,9 @@ notify_notify(const struct terminal *term, const char *title, const char *body)
|
||||||
size_t argc = 0;
|
size_t argc = 0;
|
||||||
|
|
||||||
if (!spawn_expand_template(
|
if (!spawn_expand_template(
|
||||||
&term->conf->notify, 2,
|
&term->conf->notify, 3,
|
||||||
(const char *[]){"title", "body"},
|
(const char *[]){"app-id", "title", "body"},
|
||||||
(const char *[]){title, body},
|
(const char *[]){term->conf->app_id, title, body},
|
||||||
&argc, &argv))
|
&argc, &argv))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue