status bar
git clone https://git.lucas.co/cce-status-interface.git
feat: module { text_color } app-config key
Eighth key in the bar's config file: module { text_color } — module
text — read ahead of the shared status_normal_color through
cfg_text_color, staying on the raw-sRGB side of the color-space split
(text goes to glyphon as sRGB u8, unlike the linearized quad colors).
Verified live: the DE highlight cyan recolored every module's text
within seconds off the mtime poll and restored cleanly.
Co-Authored-By: Claude Fable 5 <[email protected]>
CLAUDE.md | 4 +++-
src/config.rs | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 12de8d0..bb0bb37 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -121,7 +121,9 @@ embedded in the shared font string, which remains the fallback) and
`module { font }` (module text family; an embedded size ranks below
module { font_size } in the size chain) and `module { background_color }` (the
module box fill, rgba; linearized like every quad color, and the
-background_blur tint scaling still applies on top). Everything is read through
+background_blur tint scaling still applies on top) and `module { text_color }`
+(module text, raw-sRGB like every text color, falls back to the shared
+`status_normal_color`). Everything is read through
`cce_ui::config::cached_config()`; KDL is converted to JSON
(`cce_ui::config::parse_kdl_to_json`) and looked up with the local `json_find_key`,
which splits snake_case keys across nesting — `status_background_color` matches
diff --git a/src/config.rs b/src/config.rs
index 4a6a406..1636aef 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -113,7 +113,10 @@ fn cfg_quad_color(pointer: &str, legacy_key: &str) -> Option<[f32; 4]> {
}
pub(crate) fn read_normal_color_from_config() -> Option<[f32; 4]> {
- cfg_text_color("/style/status/normal_color", "status_normal_color")
+ // App-native `module { text_color }` first (a TEXT color — raw sRGB, per
+ // the color-space split in CLAUDE.md), then the shared status key.
+ cfg_text_color("/module/text_color", "module_text_color")
+ .or_else(|| cfg_text_color("/style/status/normal_color", "status_normal_color"))
}
pub(crate) fn read_disabled_color_from_config() -> Option<[f32; 4]> {