Create a YAML based configuration to customize key binding
Create a YAML based configuration to customize key binding.
The YAML parsing logic is defined in conf.go. Long story short, I use golobby/config to parse them. config.yaml is the config file name, with the recommended config.
A small update is added to main.go: => "fixconsole.FixConsoleIfNeeded()" This fixes the binary to properly attach to standard input output on windows platform, to facilitate debugging.
If you have a strong opinion, I can remove spew and fixconsole from the deps to make it more lightweight in dependencies. However I found the outputs very helpful for debugging.
Per discussion on https://github.com/ahmetb/RectangleWin/pull/11 I updated this one to:
- add a tray menu item to load an editor on the yaml file.
- automatically drop a sample yaml file at %HOME%/.config/RectangleWin/config.yaml if missing, and load it from there instead of the same folder.
Shall we proceed with this one or https://github.com/ahmetb/RectangleWin/pull/11?