Rename the current tag in Awesome WM

You can bind a key like this (add it to the globalkeys section):

awful.key({ modkey, "Shift",  }, "F2",    function ()
                    awful.prompt.run({ prompt = "Rename tab: ", text = awful.tag.selected().name, },
                    mypromptbox[mouse.screen].widget,
                    function (s)
                        awful.tag.selected().name = s
                    end)
            end),

It's also possible to create a shell script, which uses zenity to ask for a new tag: https://gist.github.com/blueyed/9404320 (it's a bit awkward, and I wish it would be easier to access the awesome API from the outside).


Adapted from blueyed answer but for awesome 4 add this to global keys section:

awful.key({ modkey, "Shift",  }, "F2",
              function ()
                    awful.prompt.run {
                      prompt       = "rename current tag: ",
                      text         = awful.tag.selected().name,
                      textbox      = awful.screen.focused().mypromptbox.widget,
                      exe_callback = function (s) awful.tag.selected().name = s end,
                  }
            end,
            {description = "rename tag", group = "awesome"}),

Tags:

Awesome Wm