tags: add keybinding to rename a tag

This commit is contained in:
Vincent Bernat 2012-09-11 02:29:42 +02:00
parent 432acddc23
commit f912014b83
2 changed files with 4 additions and 3 deletions

View file

@ -64,7 +64,7 @@ for i = 1, capi.screen.count() do index_cache[i] = {} end
local function getname(t) local function getname(t)
local name = awful.tag.getproperty(t, "shortname") local name = awful.tag.getproperty(t, "shortname")
if name then if name then
return name return "" .. name
end end
return t.name return t.name
end end
@ -74,7 +74,7 @@ end
-- @param name : new name -- @param name : new name
local function setname(t, name) local function setname(t, name)
if name then if name then
local dispname = name local dispname = "" .. name
local pos = awful.tag.getproperty(t, "position") local pos = awful.tag.getproperty(t, "position")
awful.tag.setproperty(t, "shortname", name) awful.tag.setproperty(t, "shortname", name)
if pos then if pos then

View file

@ -98,7 +98,8 @@ config.keys.global = awful.util.table.join(
end, end,
"Send tag to next screen"), "Send tag to next screen"),
awful.key({ modkey }, 0, shifty.add, "Create a new tag"), awful.key({ modkey }, 0, shifty.add, "Create a new tag"),
awful.key({ modkey, "Shift" }, 0, shifty.del, "Delete tag")) awful.key({ modkey, "Shift" }, 0, shifty.del, "Delete tag"),
awful.key({ modkey, "Control" }, 0, shifty.rename, "Rename tag"))
-- Bind all key numbers to tags. -- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout. -- Be careful: we use keycodes to make it works on any keyboard layout.