Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
/ renibarak Public archive

CLI and library with a bunch of helpers in Javascript which allows you to generate Karabiner-Elements config files

License

Notifications You must be signed in to change notification settings

eduarbo/renibarak

Repository files navigation

[WIP] 🚧️ Renibarak 🚧️

Renibarak (or Karabiner spelled backwards, how original!) is a CLI and library with a bunch of helpers in Javascript which allows you to generate Karabiner-Elements config files.

Tired of dealing with very large and inflexible JSON files so often I decided to make a tool that would allow me to manage, read and maintain my karabiner.json and Complex Modifications files with ease giving it the power and flexibility that a programming language can offer.

Install

npm install -g renibarak

Command Line Interface

It takes a directory as first argument that contains a set of js files to be transpiled to Karabiner-Elements compatible JSON files into the default config directory ~/.config/karabiner/ unless a second directory is passed as argument for a different destination.

If a karabiner.js file is found within the source directory it will be transpiled to karabiner.json. The rest of *.js files will be treated as Complex Modifications and therefore transpiled to JSON into the directory assets/complex_modifications/. You are free to import the library in any of these files and use any of the available helpers as you please.

Usage

$ renibarak [options] <source_dir> [destination_dir]

Options

-w, --watch                Watch a directory or file
-i, --ignore-main          Write only complex_modifications files
-v, --version              Prints version info
-h, --help                 Print usage info

Examples

Watch changes in current directory

renibarak -w .

Only transpile Complex Modifications from dotfiles directory

renibarak -i ~/.dotfiles/karabiner

Transpile files from dotfiles directory to a custom destination

renibarak ~/.dotfiles/karabiner ~/.dotfiles/karabiner/json

Config examples

For an example of Complex Modifications and main config file look at the examples/ directory.

License

MIT © Eduardo Ruiz

About

CLI and library with a bunch of helpers in Javascript which allows you to generate Karabiner-Elements config files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published