refactor(derive-ahk): push up generation logic

This commit pushes as much of the generation logic as possible to the
derive-ahk crate, so that when it is used in komorebic, we only need to
do an as_bytes() call to prepare it for being written to a file.

Besides that, this commit changes the generation command name to
'ahk-library' for clarity, and adds both additional samples and
instructions in the readme file and Scoop post-install hook.
This commit is contained in:
LGUG2Z
2021-08-23 07:49:34 -07:00
parent 2c876701d8
commit a02cd699a0
6 changed files with 238 additions and 17 deletions

View File

@@ -213,15 +213,19 @@ manage-rule Add a rule to always manage the specified applicati
workspace-rule Add a rule to associate an application with a workspace
identify-tray-application Identify an application that closes to the system tray
focus-follows-mouse Enable or disable focus follows mouse for the operating system
ahk-lib Generate a library of AutoHotKey helper functions
ahk-library Generate a library of AutoHotKey helper functions
help Print this message or the help of the given subcommand(s)
```
Additionally, you may run `komorebic.exe ahk-lib` to generate [a helper library for AutoHotKey](komorebic.lib.sample.ahk)
which wraps every `komorebic` command in a native AHK function.
### AutoHotKey Helper Library for `komorebic`
Additionally, you may run `komorebic.exe ahk-library` to
generate [a helper library for AutoHotKey](komorebic.lib.sample.ahk) which wraps every `komorebic` command in a native
AHK function.
If you include the generated library at the top of your `~/komorebi.ahk` configuration file, you will be able to call
any of the functions that it contains.
any of the functions that it contains. A sample AHK script that shows how this library can be
used [is available here](komorebi.sample.with.lib.ahk).
## Features