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

commit603a6c94485d7f5ae9916807d7f4990d7b9b6655
parentf86631349d
authorLucas Galante <[email protected]>
date2026-08-05 08:49
feat: module { padding } app-config key

Fourth key in the bar's config file: module { padding } — the text inset
inside each module box, bar-side only — read ahead of the shared
status_padding. Verified live: padding 8→16 widened the battery box
95→111 (+2×8) off the mtime poll with ZERO configure traffic (the
compositor absorb at work), and restored cleanly.

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

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

diff --git a/CLAUDE.md b/CLAUDE.md
index d23b394..68b2c43 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -114,7 +114,8 @@ the COMPOSITOR reads this one for its arrange pass — bar-side it only affects
 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
+the shared `layout { bar_height }`) and `module { padding }` (text inset inside
+each module box, bar-side only, falls back to the shared `status_padding`). 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 d39637b..a7a7fc1 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -155,7 +155,11 @@ pub(crate) fn read_status_font_size_from_config() -> f32 {
 }
 
 pub(crate) fn read_status_padding_from_config() -> f32 {
-    cfg_f32("/style/status/padding", "status_padding").unwrap_or(8.0)
+    // App-native `module { padding }` first (the text inset inside each
+    // module box — bar-side only), then the shared status key.
+    cfg_f32("/module/padding", "module_padding")
+        .or_else(|| cfg_f32("/style/status/padding", "status_padding"))
+        .unwrap_or(8.0)
 }
 
 pub(crate) fn read_status_module_spacing_from_config() -> f32 {