Add Pencil to the dynamically allocated programs

This commit is contained in:
Tom Willemse 2015-02-26 09:40:21 +01:00
parent 882ca4b99d
commit cd55a123e0

View file

@ -510,6 +510,7 @@ end
-- }}} -- }}}
-- {{{ Signals -- {{{ Signals
imp_classes = { "Dia", "Firefox", "Pencil" }
-- Signal function to execute when a new client appears. -- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c, startup) client.connect_signal("manage", function (c, startup)
if not startup then if not startup then
@ -519,7 +520,7 @@ client.connect_signal("manage", function (c, startup)
awful.client.setslave(c) awful.client.setslave(c)
end end
if awful.rules.match_any(c, { class = { "Dia", "Firefox" } }) then if awful.rules.match_any(c, { class = imp_classes }) then
tags[c.class] = tags[c.class] or tags[c.class] = tags[c.class] or
awful.tag.add(c.class, {layout = awful.layout.suit.tile}) awful.tag.add(c.class, {layout = awful.layout.suit.tile})
awful.tag.viewonly(tags[c.class]) awful.tag.viewonly(tags[c.class])
@ -539,7 +540,7 @@ client.connect_signal("manage", function (c, startup)
end) end)
client.connect_signal("unmanage", function(c) client.connect_signal("unmanage", function(c)
if awful.rules.match_any(c, { class = { "Dia", "Firefox" } }) then if awful.rules.match_any(c, { class = imp_classes }) then
if tags[c.class] and #tags[c.class]:clients() == 0 then if tags[c.class] and #tags[c.class]:clients() == 0 then
awful.tag.delete(tags[c.class]) awful.tag.delete(tags[c.class])
tags[c.class] = nil tags[c.class] = nil