whkd is a simple hotkey daemon for Windows that reacts to input events by executing commands.
Its configuration file (whkdrc
) is a series of bindings which define the associations between the input events and the
commands. By default, this file should be located in ~/.config/
, or an alternative can be set using the environment
variable WHKD_CONFIG_HOME
.
If you are compiling from the master
branch, a --config
flag is also available, which, when used, overrides the
WHKD_CONFIG_HOME
environment variable. This flag will be made available in v0.1.3+.
The format of the configuration file (and this project itself) is heavily inspired by skhd
and sxhkd
.
.shell pwsh # can be one of cmd | pwsh | powershell
.pause alt + shift + p # can be any hotkey combo to toggle all other hotkeys on and off
.pause_hook echo "you can call whatever powershell command you want here"
# Specify different behaviour depending on the app
# These "app : command" style bindings MUST come immediately below the .shell directive
alt + n [
# ProcessName as shown by `Get-Process`
Firefox : echo "hello firefox"
# Spaces are fine, no quotes required
Google Chrome : echo "hello chrome"
]
alt + q [
# Default is a keyword which will apply to all apps
# If you only have Default, this is the same as doing "alt + q : komorebic close"
Default : komorebic close
# Ignore is a keyword which will skip running the hotkey for the given process
Google Chrome : Ignore
]
# focus windows with komorebi
alt + h : komorebic focus left
alt + j : komorebic focus down
alt + k : komorebic focus up
alt + l : komorebic focus right
whkd
is licensed under the Komorebi 1.0.0 license, which
is a fork of the PolyForm Strict 1.0.0
license. On a high level
this means that you are free to do whatever you want with whkd
for
personal use other than redistribution, or distribution of new works (i.e.
hard-forks) based on the software.
Anyone is free to make their own fork of whkd
with changes intended
either for personal use or for integration back upstream via pull requests.
The Komorebi 1.0.0 License does not permit any kind of commercial use.
A dedicated Individual Commercial Use License is available for those who want to use whkd
at work.
The komorebi
Individual Commercial Use License adds “Commercial Use” as a
“Permitted Use” for the licensed individual only, for the duration of a valid paid license subscription only, for both
komorebi
and whkd
. All provisions and restrictions enumerated in
the Komorebi License
continue to apply.
Contributions are accepted with the following understanding:
- Contributed content is licensed under the terms of the 0-BSD license
- Contributors accept the terms of the project license at the time of contribution
By making a contribution, you accept both the current project license terms, and that all contributions that you have made are provided under the terms of the 0-BSD license.
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.