Simple Wayland Event Encoding Text
V2 config file parser for swhkd. Developed through Google Summer of Code 2024.
This sweet little parser is to be gradually integrated into the swhkd repo itself. For now, the grammar for the config parser is being implemented in this isolated repository.
As of now, the parser prints all the bindings that a given inputs file can expand to.
- Bindings
- Modifiers
- Regular keys
- Shorthands
- Ranges
- Omissions
- Send and on release attributes
- Unbinds
- Modes
- Oneoff
- Swallow
-
@mode
in commands
- Comments
- Imports
- Merge definitions from all imports
- Tests
- Integration into downstream WIP
- Warn user if input config is not a regular file
- Set a maximum file size cap for configs
- Map keys and modifiers to internal representation (evdev enum variants) in a single pass
Want to learn how the code works? Check out my blog where I cover each topic as I implement them.
All the examples that are currently tested against are piled up in the
hotkeys.swhkd
file. These are to be ported to actual cargo tests.
To see a structured representation of the sample config file after parsing, run the following:
cargo r -- hotkeys.swhkd
To run all available tests, run cargo test
This repo is for cathedral style development. I'm assigned with creating the parser and there's potential financial transactions involved. Contributions are NOT welcome.