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 committed by Daniel Eklöf
parent 4801d3a305
commit 6c56b04b3f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 101 additions and 2 deletions

View file

@ -36,7 +36,7 @@ notify_notify(const struct terminal *term, const char *title, const char *body)
if (!spawn_expand_template(
&term->conf->notify, 4,
(const char *[]){"app-id", "window-title", "title", "body"},
(const char *[]){term->conf->app_id, term->window_title, title, body},
(const char *[]){term->app_id ? term->app_id : term->conf->app_id, term->window_title, title, body},
&argc, &argv))
{
return;