mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-26 06:46:45 -04:00
osc: add support for osc 176 (app ID)
This adds support for a new OSC escape sequence: OSC 176, that lets terminal programs tell the terminal the name of the app that is running. foot then sets the app ID of the toplevel to that ID, which lets the compositor know which app is running, and typically sets the appropriate icon, window grouping, ... See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
This commit is contained in:
parent
4f3f614457
commit
d21190289b
3 changed files with 10 additions and 0 deletions
|
|
@ -499,6 +499,7 @@ with the terminal emulator itself. Foot implements the following OSCs:
|
||||||
* `OSC 117` - reset highlight background color
|
* `OSC 117` - reset highlight background color
|
||||||
* `OSC 119` - reset highlight foreground color
|
* `OSC 119` - reset highlight foreground color
|
||||||
* `OSC 133` - [shell integration](#shell-integration)
|
* `OSC 133` - [shell integration](#shell-integration)
|
||||||
|
* `OSC 176` - set app ID
|
||||||
* `OSC 555` - flash screen (**foot specific**)
|
* `OSC 555` - flash screen (**foot specific**)
|
||||||
* `OSC 777` - desktop notification (only the `;notify` sub-command of
|
* `OSC 777` - desktop notification (only the `;notify` sub-command of
|
||||||
OSC 777 is supported.)
|
OSC 777 is supported.)
|
||||||
|
|
|
||||||
|
|
@ -684,6 +684,11 @@ All _OSC_ sequences begin with *\\E]*, sometimes abbreviated _OSC_.
|
||||||
| \\E] 133 ; A \\E\\
|
| \\E] 133 ; A \\E\\
|
||||||
: FinalTerm
|
: FinalTerm
|
||||||
: Mark start of shell prompt
|
: Mark start of shell prompt
|
||||||
|
| \\E] 176 ; _app-id_ \\E\\
|
||||||
|
: foot
|
||||||
|
: Set app ID. _app-id_ is optional; if assigned,
|
||||||
|
the terminal window App ID will be set to the value.
|
||||||
|
An empty App ID resets the value to the default.
|
||||||
| \\E] 555 \\E\\
|
| \\E] 555 \\E\\
|
||||||
: foot
|
: foot
|
||||||
: Flash the entire terminal (foot extension)
|
: Flash the entire terminal (foot extension)
|
||||||
|
|
|
||||||
4
osc.c
4
osc.c
|
|
@ -910,6 +910,10 @@ osc_dispatch(struct terminal *term)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 176:
|
||||||
|
xdg_toplevel_set_app_id(term->window->xdg_toplevel, *string ? string : term->conf->app_id);
|
||||||
|
break;
|
||||||
|
|
||||||
case 555:
|
case 555:
|
||||||
osc_flash(term);
|
osc_flash(term);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue