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

commit50be28c756d320cfea7bedb20811efb1a1a0a981
parent9e2baaec76
authorLucas Galante <[email protected]>
date2026-07-03 12:34
Robustify is_vertical by checking window height/width against status bar thickness

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

diff --git a/src/main.rs b/src/main.rs
index feeb9e3..b6fd492 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -323,7 +323,12 @@ struct StatusApp {
 
 impl StatusApp {
     fn is_vertical(&self) -> bool {
-        if self.width < self.height {
+        let bar_thickness = read_status_height_from_config() as u32;
+        if self.width == bar_thickness && self.height != bar_thickness {
+            true
+        } else if self.height == bar_thickness && self.width != bar_thickness {
+            false
+        } else if self.width < self.height {
             true
         } else if self.width > self.height {
             false