From e4b40d40b12299afa8afadc5aaa960577dfc191e Mon Sep 17 00:00:00 2001 From: Kevin Alberts Date: Sun, 8 Feb 2026 22:46:32 +0100 Subject: [PATCH] Small fix for max layout with no clients --- kuro/theme.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kuro/theme.py b/kuro/theme.py index b2a4927..6605863 100644 --- a/kuro/theme.py +++ b/kuro/theme.py @@ -921,11 +921,16 @@ class Kuro(BaseTheme): ignore_windows = [] if screen_ref and screen_ref.top: logger.warning(f"Updating margins of bar {screen_ref.top} on screen {screen_ref} for layout {layout_ref}") - # Update margins. Bar should have no margins when there is only one client on screen (Max layout or Columns with 1 window) # and should have margins in all other cases. if isinstance(layout_ref, layout.max.Max): - screen_ref.top.margin = [0, 0, 0, 0] + logger.warning(f"Layout clients: {layout_ref.clients}") + logger.warning(f"Ignored clients: {ignore_windows}") + logger.warning(f"Extra clients: {extra_windows}") + if (len(layout_ref.clients) == 0 and len(extra_windows) == 0) or (len(ignore_windows) > 0 and all(w in ignore_windows for w in layout_ref.clients)): + screen_ref.top.margin = [8, 8, 0, 8] + else: + screen_ref.top.margin = [0, 0, 0, 0] elif isinstance(layout_ref, layout.columns.Columns): clients = extra_windows for column in layout_ref.columns: