Show Dia in its own dynamic tag
This commit is contained in:
parent
72bba12f10
commit
9a4c2b5ea8
1 changed files with 17 additions and 0 deletions
|
@ -511,6 +511,14 @@ client.connect_signal("manage", function (c, startup)
|
||||||
awful.client.setslave(c)
|
awful.client.setslave(c)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if awful.rules.match(c, { class = "Dia" }) then
|
||||||
|
tags["Dia"] = tags["Dia"] or awful.tag.add("Dia", {layout = awful.layout.suit.tile})
|
||||||
|
|
||||||
|
awful.tag.viewonly(tags["Dia"])
|
||||||
|
awful.client.movetotag(tags["Dia"], c)
|
||||||
|
awful.tag.setmwfact(0.90, tags["Dia"])
|
||||||
|
end
|
||||||
|
|
||||||
-- Put windows in a smart way, only if they does not set an initial position.
|
-- Put windows in a smart way, only if they does not set an initial position.
|
||||||
if not c.size_hints.user_position and not c.size_hints.program_position then
|
if not c.size_hints.user_position and not c.size_hints.program_position then
|
||||||
awful.placement.no_overlap(c)
|
awful.placement.no_overlap(c)
|
||||||
|
@ -519,6 +527,15 @@ client.connect_signal("manage", function (c, startup)
|
||||||
end
|
end
|
||||||
end)
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
Loading…
Reference in a new issue