Skip to content

Adapt Stumpwm's defcommand to Mahogany #35

@sdilts

Description

@sdilts

Now that we are able to detect and execute keybindings, we need a way to define and execute commands. In stumpwm, this is done via the defcommand macro.

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

In addition, there needs to be a way to interactively query the users for the parameters needed to run the command. It should also be possible to run the command programmatically so that commands can be reused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions