tags: when a tag has its default name, rename it when we can

This commit is contained in:
Vincent Bernat 2012-09-29 16:57:02 +02:00
parent b601e48d6a
commit 07e2b73dd6

View file

@ -41,7 +41,7 @@ config.apps = {}
config.defaults = {}
config.guess_name = true
config.remember_index = true
config.default_name = "new"
config.default_name = ""
config.prompt_sources = {
"config_tags",
"config_apps",
@ -596,6 +596,12 @@ function match(c, startup)
not (awful.tag.getproperty(t, "exclusive") or
(mc and mc >= #t:clients())) then
table.insert(target_tags, t)
if config.guess_name and cls then
if getname(t) == config.default_name or
getname(t) == "" .. awful.tag.getproperty(t, "position") then
setname(t, cls:lower())
end
end
end
end
end