diff --git a/awesome/rc.lua b/awesome/rc.lua index 42a5601..0d8cbaa 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -501,15 +501,11 @@ awful.rules.rules = { -- Set Firefox to always map on the first tag on screen 1. { rule = { class = "Firefox" }, - properties = { maximized = true, tag = awful.util.tagnames[3] } }, + properties = { maximized = true, tag = awful.util.tagnames[3], titlebar_color = "#0c0c0d" } }, -- Jetbrains stuff { rule_any = { class = { "jetbrains-phpstorm", "jetbrains-idea", "jetbrains-pycharm" } }, - properties = { titlebars_enabled = false, tag = awful.util.tagnames[1], maximized = false } }, - - -- jetbrains bugs - { rule = { class = "jetbrains-.*", name = "win.*" }, - properties = { titlebars_enabled = false, focusable = false, focus = true, floating = true, placement = awful.placement.restore } }, + properties = { titlebars_enabled = false, tag = awful.util.tagnames[1], maximized = false, titlebar_color = "#3c3f41" } }, -- flameshot { rule = { class = "flameshot" }, @@ -530,6 +526,10 @@ awful.rules.rules = { -- dialogs { rule = { type = "dialog" }, properties = { titlebars_enabled = true, floating = true, maximized = false, border_width = 1 } }, + + -- jetbrains bugs + { rule = { class = "jetbrains-.*", name = "win.*" }, + properties = { titlebars_enabled = false, allow_titlebars = false, focusable = false, floating = true, titlebar_color = "#ff0000" } }, } -- Signals @@ -573,20 +573,22 @@ client.connect_signal("request::titlebars", function(c) local title = awful.titlebar.widget.titlewidget(c) title.font = "Fira Code Regular 7" - awful.titlebar(c, { size = 20, fg_focus = "#ffffff" }) : setup { + awful.titlebar(c, { size = 20, fg_focus = "#ffffff", bg_focus = c.titlebar_color or beautiful.titlebar_bg_focus }) : setup { { -- Left - --awful.titlebar.widget.iconwidget(c), + awful.titlebar.widget.iconwidget(c), -- Title + buttons = buttons, + layout = wibox.container.margin, + left = 8, + right = 8, + top = 2, + bottom = 2, + }, + { -- Middle { align = "left", widget = title, - left = 20 }, - buttons = buttons, - layout = wibox.container.margin, - left = 8 - }, - { -- Middle buttons = buttons, layout = wibox.layout.flex.horizontal }, @@ -614,27 +616,21 @@ client.connect_signal("property::floating", function (c) end awful.titlebar.show(c) + c.border_width = 1 elseif not c.floating then awful.titlebar.hide(c) + c.border_width = 0 end end) --- Enable sloppy focus, so that focus follows mouse. --- client.connect_signal("mouse::enter", function(c) --- if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier --- and awful.client.focus.filter(c) then --- client.focus = c --- end --- end) - -- No border for maximized clients client.connect_signal("focus", function(c) - if c.maximized then -- no borders if only 1 client visible + if c.maximized then + c.border_width_old = c.border_width c.border_width = 0 elseif #awful.screen.focused().clients > 1 then - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus + c.border_width = c.border_width_old end end) diff --git a/awesome/themes/kadet/theme.lua b/awesome/themes/kadet/theme.lua index 1d50c46..558da4d 100644 --- a/awesome/themes/kadet/theme.lua +++ b/awesome/themes/kadet/theme.lua @@ -67,7 +67,7 @@ theme.border_focus = "#3f3f3f" theme.border_marked = "#CC9393" theme.titlebar_bg_normal = "#313742" -theme.titlebar_bg_focus = "#313742" +theme.titlebar_bg_focus = "#2f343f" theme.titlebar_fg_normal = colors.white theme.titlebar_fg_focus = colors.white @@ -308,7 +308,7 @@ function theme.connect(s) layout = wibox.layout.fixed.horizontal, { widget = wibox.container.background, - shape = gears.shape.powerline, + shape = function (cr, w, h) gears.shape.powerline(cr, w, h, -h/2) end, color = "#000000", bg = "#000000", {