Is it possible to change a tag's name without restarting awesome?

At the very least, something I can run that will change the name and also reload awesome.


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, },
                    function (s)
                        awful.tag.selected().name = s

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).

  • Had to use mouse.screen.index to make it work. – Gunar Gessner May 23 '18 at 14:12

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,
            {description = "rename tag", group = "awesome"}),
  • Thanks very much for sharing :) – Peter R May 31 '19 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.