mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-02 07:15:31 -04:00
Merge branch 'osc-9'
This commit is contained in:
commit
b5515a414a
3 changed files with 10 additions and 1 deletions
|
|
@ -60,6 +60,7 @@
|
||||||
* `tweak.pua-double-width` option to `foot.ini`, letting you force
|
* `tweak.pua-double-width` option to `foot.ini`, letting you force
|
||||||
_Private Usage Area_ codepoints to be treated as double-width
|
_Private Usage Area_ codepoints to be treated as double-width
|
||||||
characters.
|
characters.
|
||||||
|
* OSC 9 desktop notifications (iTerm2 compatible).
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
|
|
@ -579,6 +579,9 @@ All _OSC_ sequences begin with *\\E]*, sometimes abbreviated _OSC_.
|
||||||
: Hyperlink (a.k.a HTML-like anchors). _id_ is optional; if assigned,
|
: Hyperlink (a.k.a HTML-like anchors). _id_ is optional; if assigned,
|
||||||
all URIs with the same *ID* will be treated as a single
|
all URIs with the same *ID* will be treated as a single
|
||||||
hyperlink. An empty URI closes the hyperlink.
|
hyperlink. An empty URI closes the hyperlink.
|
||||||
|
| \\E] 9 ; _msg_ \\E\\
|
||||||
|
: iTerm2
|
||||||
|
: Desktop notification, uses *notify* in *foot.ini*(5).
|
||||||
| \\E] 10 ; _spec_ \\E\\
|
| \\E] 10 ; _spec_ \\E\\
|
||||||
: xterm
|
: xterm
|
||||||
: Change the default foreground color to _spec_, a color in
|
: Change the default foreground color to _spec_, a color in
|
||||||
|
|
|
||||||
7
osc.c
7
osc.c
|
|
@ -521,7 +521,7 @@ osc_notify(struct terminal *term, char *string)
|
||||||
const char *title = strtok_r(string, ";", &ctx);
|
const char *title = strtok_r(string, ";", &ctx);
|
||||||
const char *msg = strtok_r(NULL, "\x00", &ctx);
|
const char *msg = strtok_r(NULL, "\x00", &ctx);
|
||||||
|
|
||||||
notify_notify(term, title, msg);
|
notify_notify(term, title, msg != NULL ? msg : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -678,6 +678,11 @@ osc_dispatch(struct terminal *term)
|
||||||
osc_uri(term, string);
|
osc_uri(term, string);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 9:
|
||||||
|
/* iTerm2 Growl notifications */
|
||||||
|
osc_notify(term, string);
|
||||||
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
case 11:
|
case 11:
|
||||||
case 17:
|
case 17:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue