ptyfwd: optionally prefix window title with colored dot
in uid0/systemd-run/nspawn we already set a window title with a colorful
unicode dot indicating the changed privileges/execution context. This typically
gets overriden by the shell inside the environment however.
Let's tweak this a bit: when we see the window title OSC ANSI sequence
passing through, let's patch in the unicode dot as a prefix to the
title.
This is super pretty, since it makes sure root sessions via 0ad are
really easily recognizable as such, because the window title carries an
🔴 red dot as prefix then.
This commit is contained in:
committed by
Luca Boccassi
parent
461c85838e
commit
d4ece77f5e
@@ -1610,6 +1610,8 @@ static void set_window_title(PTYForward *f) {
|
||||
(void) pty_forward_set_titlef(f, "%s%s on %s", strempty(dot), cl, arg_host ?: hn);
|
||||
else
|
||||
(void) pty_forward_set_titlef(f, "%s%s", strempty(dot), cl);
|
||||
|
||||
(void) pty_forward_set_title_prefix(f, dot);
|
||||
}
|
||||
|
||||
static int start_transient_service(sd_bus *bus) {
|
||||
|
||||
Reference in New Issue
Block a user