Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a FAQ section to README.md #15

Open
Elv13 opened this issue May 21, 2013 · 2 comments
Open

Add a FAQ section to README.md #15

Elv13 opened this issue May 21, 2013 · 2 comments

Comments

@Elv13
Copy link
Owner

Elv13 commented May 21, 2013

  • How to add/remove tag with keybindings (thanks sochotnicky)
  • How to emulate and absolute index
  • How to assign dynamic keybindings
@sochotnicky
Copy link

Deleting tag is relatively simple:
awful.key({ modkey, }, "d", function () awful.tag.delete() end)

I also made rename working using following keybinding:

 awful.key({ modkey,           }, "r",
              function ()
                 awful.prompt.run({ prompt = "New tag name: " },
                                  mypromptbox[mouse.screen].widget,
                                  function(new_name)
                                     if not new_name or #new_name == 0 then
                                        return
                                     else
                                        local screen = mouse.screen
                                        local tag = awful.tag.selected(screen)
                                        if tag then
                                           tag.name = new_name
                                        end
                                     end
                                  end)
              end)

In the end I also found solution for adding:

awful.key({ modkey,           }, "a",
        function ()
                  awful.prompt.run({ prompt = "New tag name: " },
                    mypromptbox[mouse.screen].widget,
                    function(new_name)
                        if not new_name or #new_name == 0 then
                            return
                        else
                            props = {selected = true}
                            if tyrannical.tags_by_name[new_name] then
                               props = tyrannical.tags_by_name[new_name]
                            end
                            t = awful.tag.add(new_name, props)
                            awful.tag.viewonly(t)
                        end
                    end
                    )
        end),

@Elv13
Copy link
Owner Author

Elv13 commented May 21, 2013

Yes, there is a bug with exec_once, it have been reported before, I will fix that. tyrannical.tags is mostly undocumented, this need to be fixed too

Elv13 added a commit that referenced this issue May 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants