-
Notifications
You must be signed in to change notification settings - Fork 52
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
Expanded examples #237
Merged
Merged
Expanded examples #237
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Omg thx so much, this was one of the things I needed to do, but really didn't want to lol |
yavko
requested changes
Jun 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes needed
* Merged exec.rs into dispatch.rs * Removed return statements * Cleaned up keyword.rs and panic when no arguments specified * Change async examples to single threaded (Don't need the overhead) * Used rt and macros features in tokio instead of full
yavko
requested changes
Jun 2, 2024
* Stopped using kitty as default program to open for dispatch example * Panics if keyword example recieves over 2 arguments
yavko
approved these changes
Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have created a number of example binaries expanding on the existing example code. They are now using the build in cargo example framework so are run using
Asynchronous versions end with _async. Usage instuctions and example usage is given in comments at the top of each source file. I've tried where possible to make them interactive so that the user can add arguments to test out different scenarios as needed. Otherwise I have put in several different examples utilizing different flags/features.
A couple of issues cropped up during the creation of the examples. The first was due to a change in the way I invoked Tokio. In order to continue to pass hyperland::Result<()> out without extra coding I had to use the main decorator. This requires the "full" feature to be implemented in the Tokio dependency.
The second issue appears to be a bug in the library. I couldn't get the hyprland::bind macro to work. No key binding is made. Upon invesigation I found that a forward slash is added (by
CommandContent
) before the dispatch part of the bind which breaks it. I put in a fix which appears in the final commit but if you want to solve it a different way then I can just roll that commit back.