Awesome
GokuRakuJoudo
Examples — Tutorial — Telegram — Goku in the wild
<a id="GokuRakuJoudo"></a>
Intro
Goku is a tool that lets you manage your Karabiner configuration with ease.
Karabiner Elements uses JSON as its config file format. This leads to thousands of lines of JSON (sometimes over 20,000 lines), which makes it really hard to edit the config file and iterate on your keymap.
But fear not! Goku brings the edn format to the rescue.
<a id="why"></a>
Why use Goku?
Below are two Karabiner configuration snippets that map caps lock to an escape key.
<div class="HTML"> <p align="center"><img src="resources/images/karabiner.json.png" /></p> <p align="center">karabiner.json</span> </div> <div class="HTML"> <p align="center"><img src="resources/images/karabiner.edn.png" /></p> <p align="center">karabiner.edn</span> </div>In practice this means that you can see multiple Karabiner rules on you screen as you edit your config with Goku. Which speeds up the iteration speed significantly as you can create new rules as little as few characters.
<a id="install"></a>
Install
brew install yqrashawn/goku/goku
<a id="usage"></a>
Usage
Make sure you have a profile named "Default" in Karabiner's GUI tool. You can
specify your own profile name using :profiles
keyword.
Goku reads the karabiner.edn
file which holds your Karabiner config. This file
should be placed inside ~/.config/
directory on your Mac (you can start with
example.edn).
Starting from version 0.2.2, you can specify your config file path using the
environment variable GOKU_EDN_CONFIG_FILE
.
Goku provides two commands:
goku
: Will update karabiner.json once.
gokuw
: Will keep watching your karabiner.edn
and when it changes, it will update your
karabiner.json
configuration.
Run command brew services start goku
to use it as a service (runs gokuw
in
background). When Goku is running as service, the logs are kept inside
~/Library/Logs/goku.log
.
Use goku -h
to learn more.
<a id="tutorial"></a>
Tutorial
Read through the Tutorial about how you can write the configuration in Goku.
If there's any question or advice, just open an issue or join Karabiner Telegram group and ask your questions there.
<a id="note"></a>
Note
Using#_
to comment out rules like this will leave a null rule (see below) in karabiner.json, it won't cause any error.
{
"description" : null,
"manipulators" : [ ]
}
<a id="changelog"></a>
Changelog
Check CHANGELOG file.
<a id="dependencies"></a>
Dependencies
watchexec for watching the edn config
file.
joker for linting the edn config file.
<a id="contributing"></a>
Contributing
Use lein repl
for developing.
make compile
to compile clojure file to jar
make bin
to compile jar to native file (make sure GRAALVM native-image
binary is in PATH
)