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 input:kb_file option to use a .xkb file. #548

Merged
merged 2 commits into from
Aug 19, 2022
Merged

Conversation

FlafyDev
Copy link
Contributor

Describe your PR, what does it fix/add?

The PR adds an option to add a .xkb file as your layout instead of using the existing 5 xkb options.

When the option is set to a valid file, it doesn't use the other xkb options.
When the option is set to null or fails, it uses the other xkb options.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

  • I created a function called absolutePath in order to reduce duplicated code but wasn't sure where to put it so I kept it in ConfigManager. This is probably not smart to do, but because I'm not familiar with c++, I wasn't sure where to put it.

Is it ready for merging, or does it need work?

From what I tested it works.
Tested:

  • When the option is set to null
  • When the option is set to a full path
  • When the option starts with ~
  • When the option points to a non existing file (silently fails)

@vaxerski
Copy link
Member

pretty nice cutie, just one thing: move the absolutePath func to miscfunctions.cpp, and add another param for the cwd instead of configCurrentPath

@FlafyDev
Copy link
Contributor Author

Done. I had to make configCurrentPath public, though.

@vaxerski
Copy link
Member

lgtm. Thanks!

@vaxerski vaxerski merged commit 223ca6e into hyprwm:main Aug 19, 2022
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

Successfully merging this pull request may close these issues.

2 participants