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

commite348cb1e8abc04437de8c2d6c6f662641fd47fca
parent974568069b
authorLucas Galante <[email protected]>
date2026-08-05 08:24
feat: module { spacing } app-config key

Second key in the bar's own config file: module { spacing }, read ahead
of the shared status_module_spacing. The compositor reads the same key
for the gap BETWEEN segments (the visible effect in per-module mode);
this reader covers the intra-surface layout of a multi-module bar.

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

 src/config.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/config.rs b/src/config.rs
index 08ad5a0..d7ca0a6 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -154,7 +154,12 @@ pub(crate) fn read_status_padding_from_config() -> f32 {
 }
 
 pub(crate) fn read_status_module_spacing_from_config() -> f32 {
-    cfg_f32("/style/status/module_spacing", "status_module_spacing").unwrap_or(8.0)
+    // App-native `module { spacing }` first (the same value the compositor
+    // reads for the gap BETWEEN segments — this reader only matters for the
+    // intra-surface layout of a multi-module bar), then the shared key.
+    cfg_f32("/module/spacing", "module_spacing")
+        .or_else(|| cfg_f32("/style/status/module_spacing", "status_module_spacing"))
+        .unwrap_or(8.0)
 }
 
 pub(crate) fn read_separator_color_from_config() -> Option<[f32; 4]> {