From c0c3c81d69d43c4db3e3d26e674bffbfde8504e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20K=C3=BCnzi?= <22870774+ArnaudKunzi@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:31:57 +0200 Subject: [PATCH] docs(mkdocs): add more info on whkdrc config --- docs/example-configurations.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/example-configurations.md b/docs/example-configurations.md index bef8da98..a009cc40 100644 --- a/docs/example-configurations.md +++ b/docs/example-configurations.md @@ -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: 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 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" %} ``` +### 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 There is one special directive at the top of the file, `.shell` which can be