Created
August 6, 2019 21:04
-
-
Save DorianGray/e94019d76f70f27a8a95ed1d370d3617 to your computer and use it in GitHub Desktop.
signal handler for changing border width per layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Arrange signal handler | |
for s in screen do s:connect_signal('arrange', function () | |
local clients = awful.client.visible(s) | |
local layout = awful.layout.getname(awful.layout.get(s)) | |
if #clients > 0 then -- Fine grained borders and floaters control | |
for _, c in pairs(clients) do -- Floaters always have borders | |
if c.floating or layout == 'floating' then | |
c.border_width = beautiful.border_width | |
-- No borders with only one visible client | |
elseif #clients == 1 or layout == 'max' then | |
c.border_width = 0 | |
else | |
c.border_width = beautiful.border_width | |
end | |
end | |
end | |
end) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment