mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 11:12:31 +00:00
Handle client border when un/maximising
This commit is contained in:
parent
9a2c8d4ca8
commit
a946a59e9c
|
@ -711,14 +711,16 @@ client.connect_signal("mouse::enter", function(c)
|
|||
end)
|
||||
|
||||
-- No border for maximized clients
|
||||
client.connect_signal("focus",
|
||||
function(c)
|
||||
if c.maximized then -- no borders if only 1 client visible
|
||||
c.border_width = 0
|
||||
elseif #awful.screen.focused().clients > 1 then
|
||||
c.border_width = beautiful.border_width
|
||||
c.border_color = beautiful.border_focus
|
||||
end
|
||||
end)
|
||||
function border_adjust(c)
|
||||
if c.maximized then -- no borders if only 1 client visible
|
||||
c.border_width = 0
|
||||
elseif #awful.screen.focused().clients > 1 then
|
||||
c.border_width = beautiful.border_width
|
||||
c.border_color = beautiful.border_focus
|
||||
end
|
||||
end
|
||||
|
||||
client.connect_signal("focus", border_adjust)
|
||||
client.connect_signal("property::maximized", border_adjust)
|
||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||
-- }}}
|
||||
|
|
Loading…
Reference in a new issue