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

Feature request: export layout config for the GitHub action #47

Open
dhruvinsh opened this issue Sep 11, 2023 · 3 comments
Open

Feature request: export layout config for the GitHub action #47

dhruvinsh opened this issue Sep 11, 2023 · 3 comments

Comments

@dhruvinsh
Copy link

dhruvinsh commented Sep 11, 2023

While using the keymap-drawer action, if the draw_args are provided for type of keyboard or layout as a override, can we please put this details in the keyboard.yaml (keymap yaml) file in the output folder.

      draw_args: "lynx:'-k ferris/sweep -l LAYOUT_split_3x5_2'"

would have output in lynx.yaml config as

layout:
  qmk_keyboard: ferris/sweep
  qmk_layout: LAYOUT_split_3x5_2

This way I can just use the whole config file in the online svg editor.

@caksoylar
Copy link
Owner

It sounds reasonable. While keymap draw augments the internal keymap representation with the command line options it receives, there is no way to export that internal representation afterwards. There can be an additional command line switch to do that.

As an aside, this might also help #8. In that case, if the input YAML doesn't have combo placement hints, keymap draw would automatically determine the best ones. But I wasn't sure how I could expose these back to the user. This might be one way, i.e. output an augmented YAML as a result of the drawing.

@dhruvinsh
Copy link
Author

Perhaps keymap parse and keymap draw can share the same argument for the layout?

That way we can use parse to feed layout info and update the keymap yaml file, and draw works as is without breaking any functionality, and it does have a check to look at the argument or the config file

If you are okay with this I can send you a pull requests.

@caksoylar
Copy link
Owner

That's true, it can be another solution to override the layout that the parser comes up with. You can make a PR for it -- ideally we would duplicate too much logic for the validation/assignment, but if that will make the PR complicated I might rather refactor it myself in the future.

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