Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yqrashawn/gokurakujoudo

config karabiner with ease
https://github.com/yqrashawn/gokurakujoudo

config goku karabiner karabiner-configurator keyboard macos wild

Last synced: about 1 month ago
JSON representation

config karabiner with ease

Awesome Lists containing this project

README

        

# GokuRakuJoudo

![img](https://travis-ci.com/yqrashawn/GokuRakuJoudo.svg?branch=master)
![img](https://coveralls.io/repos/github/yqrashawn/GokuRakuJoudo/badge.svg)

[Examples](./examples.org) —
[Tutorial](./tutorial.md) —
[Telegram](https://t.me/joinchat/UDlL5H7VIwAVK0_7) —
[Goku in the wild](./in-the-wild.md)

1. [Intro](#intro)
1. [Why use Goku?](#why)
2. [Install](#install)
3. [Usage](#usage)
4. [Tutorial](#tutorial)
5. [Note](#note)
6. [Changelog](#changelog)
7. [Dependencies](#dependencies)
8. [Contributing](#contributing)

# Intro

Goku is a tool that lets you manage your
[Karabiner](https://github.com/tekezo/Karabiner-Elements) 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](https://github.com/edn-format/edn) to the rescue.

## Why use Goku?

Below are two Karabiner configuration snippets that map caps lock to an escape
key.



karabiner.json




karabiner.edn


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.

## Install

brew install yqrashawn/goku/goku

## Usage

Make sure you have a profile named "Default" in Karabiner's GUI tool. You can
specify your own profile name [using `:profiles`
keyword](https://github.com/yqrashawn/GokuRakuJoudo/blob/master/examples.org#profiles-wip).

![img](./resources/images/karabiner-profile.jpg)

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](./resources/configurations/edn/example.edn "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.

## Tutorial

Read through the [Tutorial about how you can write the configuration in
Goku](./tutorial.md).

If there's any question or advice, just [open an issue](../../issues/new) or
join [Karabiner Telegram group](https://t.me/joinchat/UDlL5H7VIwAVK0_7) and ask your
questions there.

## Note

- ~~Using `#_` to comment out rules [like
this](https://github.com/yqrashawn/yqdotfiles/blob/2699f833f9431ca197d50f6905c825712f7aee8d/.config/karabiner.edn#L41)
will leave a null rule (see below) in karabiner.json, it won't cause any
error.~~

```json
{
"description" : null,
"manipulators" : [ ]
}
```

## Changelog

Check [CHANGELOG](./CHANGELOG.org) file.

## Dependencies

[watchexec](https://github.com/watchexec/watchexec) for watching the edn config
file.
[joker](https://github.com/candid82/joker) for linting the edn config file.

## Contributing

Use `lein repl` for developing.

Change [Makefile.local.example](./Makefile.local.example)'s name to
`Makefile.local`, change `GRAALVM` variable in the makefile to right path, run
`make local` to test then generate `goku` binary file.