docs(mkdocs): add more info on whkdrc config

This commit is contained in:
Arnaud Künzi
2024-09-30 15:31:57 +02:00
committed by LGUG2Z
parent 7276dc2309
commit c0c3c81d69

View File

@@ -177,7 +177,7 @@ If you like the `grid` layout in [LeftWM](https://github.com/leftwm/leftwm-layou
`whkd` is a fairly basic piece of software with a simple configuration format: `whkd` is a fairly basic piece of software with a simple configuration format:
key bindings go to the left of the colon, and shell commands go to the right of the key bindings go to the left of the colon, and shell commands go to the right of the
colon. By default, the `whkdrc` file should be located in the `$Env:USERPROFILE/.config/` directory. colon.
Please remember that `whkd` does not support overriding Microsoft's limitations Please remember that `whkd` does not support overriding Microsoft's limitations
on hotkey bindings that include the `Windows` key. If this is important to you, on hotkey bindings that include the `Windows` key. If this is important to you,
@@ -188,6 +188,25 @@ bindings for `komorebic` commands instead.
{% include "./whkdrc.sample" %} {% include "./whkdrc.sample" %}
``` ```
### Configuration
`whkd` searches for a `whkdrc` configuration file in the following locations:
* `$Env:WHKD_CONFIG_HOME`
* `$Env:USERPROFILE/.config`
It is also possible to change a hotkey behavior depending on which application has focus:
```
alt + n [
# ProcessName as shown by `Get-Process`
Firefox : echo "hello firefox"
# Spaces are fine, no quotes required
Google Chrome : echo "hello chrome"
]
```
### Setting .shell ### Setting .shell
There is one special directive at the top of the file, `.shell` which can be There is one special directive at the top of the file, `.shell` which can be