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:
delthas 2023-09-04 14:02:05 +02:00
parent 4f3f614457
commit d21190289b
3 changed files with 10 additions and 0 deletions

4
osc.c
View file

@ -910,6 +910,10 @@ osc_dispatch(struct terminal *term)
}
break;
case 176:
xdg_toplevel_set_app_id(term->window->xdg_toplevel, *string ? string : term->conf->app_id);
break;
case 555:
osc_flash(term);
break;