From 07e2b73dd69a4ad45adad849070646bbb7701d0f Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 29 Sep 2012 16:57:02 +0200 Subject: [PATCH] tags: when a tag has its default name, rename it when we can --- lib/shifty.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/shifty.lua b/lib/shifty.lua index 284848b..54deca0 100644 --- a/lib/shifty.lua +++ b/lib/shifty.lua @@ -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