diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index ffca8d8..be44348 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -511,11 +511,14 @@ client.connect_signal("manage", function (c, startup) awful.client.setslave(c) end - if awful.rules.match(c, { class = "Dia" }) then - tags["Dia"] = tags["Dia"] or awful.tag.add("Dia", {layout = awful.layout.suit.tile}) + if awful.rules.match_any(c, { class = { "Dia", "Firefox" } }) then + tags[c.class] = tags[c.class] or + awful.tag.add(c.class, {layout = awful.layout.suit.tile}) + awful.tag.viewonly(tags[c.class]) + awful.client.movetotag(tags[c.class], c) + end - awful.tag.viewonly(tags["Dia"]) - awful.client.movetotag(tags["Dia"], c) + if awful.rules.match(c, { class = "Dia" }) then awful.tag.setmwfact(0.90, tags["Dia"]) end @@ -528,10 +531,10 @@ client.connect_signal("manage", function (c, startup) end) client.connect_signal("unmanage", function(c) - if awful.rules.match(c, { class = "Dia" }) then - if #tags["Dia"]:clients() == 0 then - awful.tag.delete(tags["Dia"]) - tags["Dia"] = nil + if awful.rules.match_any(c, { class = { "Dia", "Firefox" } }) then + if tags[c.class] and #tags[c.class]:clients() == 0 then + awful.tag.delete(tags[c.class]) + tags[c.class] = nil end end end)