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

Adapt Stumpwm's defcommand to Mahogany #35

Open
sdilts opened this issue Oct 14, 2023 · 0 comments
Open

Adapt Stumpwm's defcommand to Mahogany #35

sdilts opened this issue Oct 14, 2023 · 0 comments

Comments

@sdilts
Copy link
Collaborator

sdilts commented Oct 14, 2023

Now that we are able to detect and execute keybindings, we need a way to define and execute commands.

We are still missing any machinery to get prompts from users, so we can't implement everything, but it would be nice to get something working.

Here are the requirements for right now:

  • We need to be able to lookup the command via a string or its symbol name.
  • Whatever function that gets generated by the decommand macro needs to accept the seat and key sequence that was used to trigger the command as keyword arguments. If the user doesn't want to use this info, it should not affect how they write the command and they shouldn't need to specify those arguments when they write the function signature.
  • Any commands registered via decommand should have docstrings and other documentation easily available so we can build a help command.
  • The implementation shouldn't expose any non-trivial lexical variables as a part of its interface so it's easier to refactor without breaking a public API.

We don't need all of this at once, but these requirements should guide the initial implementation.

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

1 participant