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 command to list possible hotkeys for current mode #130

Open
davidisaaclee opened this issue Jun 7, 2020 · 1 comment
Open

Add command to list possible hotkeys for current mode #130

davidisaaclee opened this issue Jun 7, 2020 · 1 comment

Comments

@davidisaaclee
Copy link

Given the following skhdrc:

a : echo "do this"

:: mymode
ctrl - m ; mymode
mymode < a : echo "in mymode – do this"
mymode < b : echo "in mymode – do that"

I'd like to be able to perform something like the following commands:

# in default mode
# `--show-options` is a new command which prints the possible hotkeys for the current state of skhd.
$ skhd --show-options
a : echo "do this"

# user presses `ctrl - m` and enters `mymode`
$ skhd --show-options
mymode < a : echo "in mymode – do this"
mymode < b : echo "in mymode – do that"

Let me know if the behavior is not clear and I can try to explain more.

I'm looking for this kind of command to help me write a GUI helper that shows me what commands I can invoke. I could write this as a separate application, but it seems like I would need to maintain a separate parser, and I would need to be able to track skhd's active mode to return only the relevant results.

I think my ideal output for this command would be JSON corresponding to the hotkey struct to avoid needing any further parsing.

Is this something you would want in skhd? I don't have a lot of C experience, so I thought I would ask before taking time to dive in.

@koekeishiya
Copy link
Owner

This is reasonable, yes. I may have plans to revise both the syntax and a large part of the internal structure, so I don't think it would be beneficial for you to try and work this into the current master. Feel free to mess around if you want to learn how skhd works or enjoy this kind of work though.

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