Floating: border_width, titlebars.

This commit is contained in:
Kolan Sh 2020-04-03 16:01:05 +03:00
parent 477533aa40
commit 6837a73977
1 changed files with 11 additions and 7 deletions

12
rc.lua
View File

@ -695,7 +695,7 @@ root.keys(globalkeys)
awful.rules.rules = { awful.rules.rules = {
-- All clients will match this rule. -- All clients will match this rule.
{ rule = { }, { rule = { },
properties = { border_width = beautiful.border_width, properties = { border_width = naughty.config.defaults.border_width,
border_color = beautiful.border_normal, border_color = beautiful.border_normal,
focus = awful.client.focus.filter, focus = awful.client.focus.filter,
raise = true, raise = true,
@ -1026,11 +1026,15 @@ end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus 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) 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 -- Borders for floating windows
client.connect_signal("property::floating", function(c) screen.connect_signal("arrange", function(s)
if c.floating then for _, c in pairs(s.clients) do
if c.floating == true then
c.border_width = naughty.config.defaults.border_width
awful.titlebar.show(c) awful.titlebar.show(c)
else else
c.border_width = 0
awful.titlebar.hide(c) awful.titlebar.hide(c)
end end
end
end) end)