diff --git a/docs/layouts/layout.md b/docs/layouts/layout.md index 5a9bcd6..85fc547 100644 --- a/docs/layouts/layout.md +++ b/docs/layouts/layout.md @@ -19,6 +19,7 @@ bling.layout.deck ```lua -- mstab +theme.mstab_bar_disable = false -- disable the tabbar theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the -- currently focused stack window (set it to true if you use diff --git a/docs/theme.md b/docs/theme.md index ea885ff..0d1d0b3 100644 --- a/docs/theme.md +++ b/docs/theme.md @@ -42,6 +42,7 @@ theme.tabbar_fg_normal_inactive = nil -- foreground color of unfocused clients theme.tabbar_disable = false -- disable the tab bar entirely -- mstab +theme.mstab_bar_disable = false -- disable the tabbar theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the -- currently focused stack window (set it to true if you use diff --git a/layout/mstab.lua b/layout/mstab.lua index 639275f..93ceb0e 100644 --- a/layout/mstab.lua +++ b/layout/mstab.lua @@ -7,6 +7,7 @@ local mylayout = {} mylayout.name = "mstab" +local tabbar_disable = beautiful.mstab_bar_disable or false local tabbar_ontop = beautiful.mstab_bar_ontop or false local tabbar_padding = beautiful.mstab_bar_padding or "default" local border_radius = beautiful.mstab_border_radius @@ -193,16 +194,18 @@ function mylayout.arrange(p) local tabbar_width_change = 0 local tabbar_y_change = 0 local tabbar_x_change = 0 - if tabbar_position == "top" then - tabbar_size_change = tabbar_size + tabbar_padding - tabbar_y_change = tabbar_size + tabbar_padding - elseif tabbar_position == "bottom" then - tabbar_size_change = tabbar_size + tabbar_padding - elseif tabbar_position == "left" then - tabbar_width_change = tabbar_size + tabbar_padding - tabbar_x_change = tabbar_size + tabbar_padding - elseif tabbar_position == "right" then - tabbar_width_change = tabbar_size + tabbar_padding + if not tabbar_disable then + if tabbar_position == "top" then + tabbar_size_change = tabbar_size + tabbar_padding + tabbar_y_change = tabbar_size + tabbar_padding + elseif tabbar_position == "bottom" then + tabbar_size_change = tabbar_size + tabbar_padding + elseif tabbar_position == "left" then + tabbar_width_change = tabbar_size + tabbar_padding + tabbar_x_change = tabbar_size + tabbar_padding + elseif tabbar_position == "right" then + tabbar_width_change = tabbar_size + tabbar_padding + end end -- Iterate through slaves @@ -231,14 +234,16 @@ function mylayout.arrange(p) p.geometries[c] = g end - update_tabbar( - slave_clients, - t, - t.top_idx, - area, - master_area_width, - slave_area_width - ) + if not tabbar_disable then + update_tabbar( + slave_clients, + t, + t.top_idx, + area, + master_area_width, + slave_area_width + ) + end end return mylayout diff --git a/theme-var-template.lua b/theme-var-template.lua index 421d37c..13d0f5a 100644 --- a/theme-var-template.lua +++ b/theme-var-template.lua @@ -42,6 +42,7 @@ theme.tabbar_bg_normal_inactive = nil -- background color of unfocused clients o theme.tabbar_fg_normal_inactive = nil -- foreground color of unfocused clients on the tabbar when inactive -- mstab +theme.mstab_bar_disable = false -- disable the tabbar theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the -- currently focused stack window (set it to true if you use