git.lucas.co / cce-status-interface
status bar
git clone https://git.lucas.co/cce-status-interface.git

commitf86631349db2cad0e224b1b43eddd2744f7609c7
parent07c2684cd8
authorLucas Galante <[email protected]>
date2026-08-05 08:31
feat: module { height } app-config key

Third key in the bar's own config file: module { height }, read ahead of
the shared layout { bar_height }. The compositor reads the same key for
the arrange pass's segment height and reserved strip (cce-fx@HEAD), so
both sides of the surface-size negotiation always agree.

Co-Authored-By: Claude Fable 5 <[email protected]>

 CLAUDE.md     | 5 ++++-
 src/config.rs | 7 ++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 5660c30..d23b394 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -111,7 +111,10 @@ merge by executable name; both files' mtimes drive the live-reload poll via
 `module { corner_radius }` (overall module box radius, falls back to the shared
 `status_box_corner_radius`) and `module { spacing }` (the gap between segments;
 the COMPOSITOR reads this one for its arrange pass — bar-side it only affects a
-multi-module surface — applied on `ccectl reload`). Everything is read through
+multi-module surface — applied on `ccectl reload`) and `module { height }` (the
+bar height; read by BOTH sides — bar surfaces live via the mtime poll, the
+compositor's segment height + reserved strip on `ccectl reload` — falls back to
+the shared `layout { bar_height }`). 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 d7ca0a6..d39637b 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -135,7 +135,12 @@ pub(crate) fn read_status_font_from_config() -> String {
 }
 
 pub(crate) fn read_status_height_from_config() -> f32 {
-    cfg_f32("/layout/bar_height", "bar_height").unwrap_or(28.0)
+    // App-native `module { height }` first — the compositor reads the same
+    // key for the arrange pass's segment height and reserved strip, so the
+    // two sides always agree — then the shared layout { bar_height }.
+    cfg_f32("/module/height", "module_height")
+        .or_else(|| cfg_f32("/layout/bar_height", "bar_height"))
+        .unwrap_or(28.0)
 }
 
 pub(crate) fn read_status_font_size_from_config() -> f32 {