From 6837a73977d2c00629b070e0f0a4b1b2521a4d87 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 3 Apr 2020 16:01:05 +0300 Subject: [PATCH] Floating: border_width, titlebars. --- rc.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/rc.lua b/rc.lua index bfff8a2..87ef913 100644 --- a/rc.lua +++ b/rc.lua @@ -695,7 +695,7 @@ root.keys(globalkeys) awful.rules.rules = { -- All clients will match this rule. { rule = { }, - properties = { border_width = beautiful.border_width, + properties = { border_width = naughty.config.defaults.border_width, border_color = beautiful.border_normal, focus = awful.client.focus.filter, raise = true, @@ -1026,11 +1026,15 @@ end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- Show titlebar for floating windows only. https://www.reddit.com/r/awesomewm/comments/bki1md/show_titlebar_only_when_window_is_floating -client.connect_signal("property::floating", function(c) - if c.floating then - awful.titlebar.show(c) - else - awful.titlebar.hide(c) +-- Borders for floating windows +screen.connect_signal("arrange", function(s) + for _, c in pairs(s.clients) do + if c.floating == true then + c.border_width = naughty.config.defaults.border_width + awful.titlebar.show(c) + else + c.border_width = 0 + awful.titlebar.hide(c) + end end end)