summaryrefslogtreecommitdiff
path: root/func/noborders.lua
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-04-14 22:14:22 -0500
committerTim Keller <tjkeller.xyz>2025-04-14 22:14:22 -0500
commitcbcc13cd2e80503ccd43024abeb587a8f2738812 (patch)
tree36f3fc276f3b7a6defe6443fd90bf880eac9bce4 /func/noborders.lua
parentd5874600311f89ce25ecce19cf4047387db455a2 (diff)
downloadawesome-cbcc13cd2e80503ccd43024abeb587a8f2738812.tar.xz
awesome-cbcc13cd2e80503ccd43024abeb587a8f2738812.zip
apply borders when in floating mode
Diffstat (limited to 'func/noborders.lua')
-rw-r--r--func/noborders.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/func/noborders.lua b/func/noborders.lua
index 89086b5..83069af 100644
--- a/func/noborders.lua
+++ b/func/noborders.lua
@@ -3,14 +3,15 @@ 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)
if s.selected_tag == nil then return end
- local max = s.selected_tag.layout.name == "max"
+ local max = s.selected_tag.layout.name == "max"
+ local floating = s.selected_tag.layout.name == "floating"
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
+ elseif (max or only_one or c.maximized) and not floating and not c.floating then
c.border_width = 0
else
c.border_width = beautiful.border_width