shifty: when a tag is has the same name than its position, don't duplicate

This commit is contained in:
Vincent Bernat 2012-09-11 02:23:12 +02:00
parent 3380eded5a
commit 432acddc23

View file

@ -75,9 +75,12 @@ end
local function setname(t, name)
if name then
local dispname = name
local pos = awful.tag.getproperty(t, "position")
awful.tag.setproperty(t, "shortname", name)
if awful.tag.getproperty(t, "position") then
dispname = awful.tag.getproperty(t, "position") .. '' .. dispname
if pos then
if "" .. pos ~= "" .. dispname then
dispname = pos .. '' .. dispname
end
end
t.name = dispname
end