Skip to content

Commit

Permalink
Fix non existent class (ugly)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmun committed Jul 24, 2021
1 parent 8ae42c5 commit f0f2ccc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ client.connect_signal("request::titlebars", function(c)
local client_color = {}

if file ~= nil then
client_color = json.decode(file:read("*all"))[c.class]
client_color = json.decode(file:read("*all"))[c.class] or { focus = "#3c3c3c", normal = "#303030" }
file:close()
end

Expand All @@ -203,8 +203,8 @@ client.connect_signal("request::titlebars", function(c)
awful.titlebar(c, {
position = positions[i],
size = 2,
bg_focus = client_color["focus"] or "#3c3c3c",
bg_normal = client_color["normal"] or "#303030",
bg_focus = client_color["focus"],
bg_normal = client_color["normal"],
}) : setup {
layout = wibox.layout.align.horizontal
}
Expand Down

0 comments on commit f0f2ccc

Please sign in to comment.