]> git.ipfire.org Git - thirdparty/systemd.git/commit
ptyfwd: optionally prefix window title with colored dot
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Feb 2024 14:54:22 +0000 (15:54 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 23 Feb 2024 21:15:25 +0000 (21:15 +0000)
commitd4ece77f5e10bdcaf9c756f244fa7f755063ce2d
tree980fd0e36d2f25388ae79628e73877ba89eb6cc2
parent461c85838edba003e8fc68f61826b2671f5c8d9d
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.
src/nspawn/nspawn.c
src/run/run.c
src/shared/ptyfwd.c
src/shared/ptyfwd.h