diff options
author | Tom Willemse | 2015-02-26 00:36:12 +0100 |
---|---|---|
committer | Tom Willemse | 2015-02-26 00:36:12 +0100 |
commit | cd7bdc03cf1bd3fc7493ae36b1eb9ec5af1e2ccd (patch) | |
tree | 976518f7911915f5032445d04bedd3df278a58ba /awesome | |
parent | 9a4c2b5ea835dba22fb3ddbba43f4dcad4fb5977 (diff) | |
download | dotfiles-cd7bdc03cf1bd3fc7493ae36b1eb9ec5af1e2ccd.tar.gz dotfiles-cd7bdc03cf1bd3fc7493ae36b1eb9ec5af1e2ccd.zip |
Also dynamically create a tag for Firefox
Diffstat (limited to 'awesome')
-rw-r--r-- | awesome/.config/awesome/rc.lua | 19 |
1 files changed, 11 insertions, 8 deletions
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) |