blob: fe67024c2d8c535fc7f792a2e66f64488e1b4007 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
local beautiful = require("beautiful")
-- TODO this function will call arrange multiple times. once per each change of c.border_width
local function update_borders(s)
local max = s.selected_tag.layout.name == "max"
local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count
-- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows
for _, c in pairs(s.clients) do
if c.prevent_kill then
c.border_width = beautiful.border_width * 3
elseif (max or only_one or c.maximized) and not c.floating then
c.border_width = 0
else
c.border_width = beautiful.border_width
end
end
end
screen.connect_signal("arrange", update_borders) -- NOTE this signal may eventually be deprecated. see issue #2581 and the v5 milestone on github
|