fix adjust_visibility
This commit is contained in:
parent
bc980b7dfe
commit
b3532b01d8
|
@ -88,30 +88,17 @@ function update_tabbar(
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Change visibility of the tab bar when layout, selected tag or number of clients (visible, master, slave) changes
|
-- Change visibility of the tab bar when layout, selected tag or number of clients (visible, master, slave) changes
|
||||||
local function adjust_visiblity(t)
|
local function adjust_visibility()
|
||||||
s.tabbar.visible = (#t:clients() - t.master_count > 1)
|
local name = awful.layout.getname( awful.layout.get( s ) )
|
||||||
and (t.layout.name == mylayout.name)
|
s.tabbar.visible = (name == mylayout.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
tag.connect_signal("property::selected", function(t)
|
tag.connect_signal("property::selected", adjust_visibility)
|
||||||
adjust_visiblity(t)
|
tag.connect_signal("property::layout", adjust_visibility)
|
||||||
end)
|
tag.connect_signal("tagged", adjust_visibility)
|
||||||
tag.connect_signal("property::layout", function(t, layout)
|
tag.connect_signal("untagged", adjust_visibility)
|
||||||
adjust_visiblity(t)
|
tag.connect_signal("property::master_count", adjust_visibility)
|
||||||
end)
|
client.connect_signal("property::minimized", adjust_visibility)
|
||||||
tag.connect_signal("tagged", function(t, c)
|
|
||||||
adjust_visiblity(t)
|
|
||||||
end)
|
|
||||||
tag.connect_signal("untagged", function(t, c)
|
|
||||||
adjust_visiblity(t)
|
|
||||||
end)
|
|
||||||
tag.connect_signal("property::master_count", function(t)
|
|
||||||
adjust_visiblity(t)
|
|
||||||
end)
|
|
||||||
client.connect_signal("property::minimized", function(c)
|
|
||||||
local t = c.first_tag
|
|
||||||
adjust_visiblity(t)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- update the tabbar size and position (to support gap size change on the fly)
|
-- update the tabbar size and position (to support gap size change on the fly)
|
||||||
|
|
Loading…
Reference in New Issue