]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
update TODO
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Mar 2025 17:12:23 +0000 (18:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Mar 2025 17:12:48 +0000 (18:12 +0100)
TODO

diff --git a/TODO b/TODO
index 9f270ca30e02e7864f2464fc268e66424ea2abb2..2ba93bb04187bcfbf510bb076119f6fe68cb5b6a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -182,8 +182,16 @@ Features:
 * gpt-auto-root doesn't take image policy into account.
 
 * maybe define a /etc/machine-info field for the ANSI color to associate with a
-  hostname. Then use it for the shell prompt to highlight the hostname. Maybe
-  even hash it from the hostname as a fallback, in a reasonable way.
+  hostname. Then use it for the shell prompt to highlight the hostname. If no
+  color is explicitly set, hash a color automatically from the hostname as a
+  fallback, in a reasonable way. Take inspiration from the ANSI_COLOR= field
+  that already exists in /etc/os-release, i.e. use the same field name and
+  syntax. When hashing the color, use the hsv_to_rgb() helper we already have,
+  fixate S and V to something reasonable and constant, and derive the H from
+  the hostname. Ultimate goal with this: give people a visual hint about the
+  system they are on if the have many to deal with, by giving each a color
+  identity. This code should be placed in hostnamed, so that clients can query
+  the color via varlink or dbus.
 
 * unify how blockdev_get_root() and sysupdate find the default root block device