8

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.

blueyed
  • 1,241
Ivan
  • 4,679

2 Answers2

11

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

blueyed
  • 1,241
3

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"}),