diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..78bce0ee5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "core"] + path = core + url = https://github.com/pqrs-org/KE-complex_modifications-core.git diff --git a/Makefile b/Makefile index d20b4a376..b4a630917 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ all: @echo "============================================================" @echo - bash scripts/update-json.sh + sandbox-exec -f core/files/generator.sb bash scripts/update-json.sh python3 scripts/lint-src-json.py src/json python3 scripts/lint-public-json.py public/json ruby scripts/lint-groups.rb diff --git a/README.md b/README.md index c854e294b..701d485b8 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,17 @@ complex_modifications for Karabiner-Elements. ## Add rules -1. Put a JSON generator file (`.rb`, `.erb` or `.js`) into [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/src/json). +1. Clone repository. + + ```shell + git clone --depth 1 https://github.com/pqrs-org/KE-complex_modifications.git + cd KE-complex_modifications + git submodule update --init --recursive --depth 1 + ``` + +2. Put a JSON generator file (`.rb`, `.erb` or `.js`) into [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/src/json). (Or put a `.json` file directly into [public/json](https://github.com/pqrs-org/KE-complex_modifications/tree/main/public/json) directly.) -2.
+3.
(Optional) Update public/groups.json if you want to add your rules into specific category. Add the following entry into `groups.json`. @@ -25,7 +33,7 @@ complex_modifications for Karabiner-Elements.
-3. Run `make` command on Terminal.
If you've a generator file into `src/json`, formatted json file will be auto generated in the `public/json/your_awesome_configuration.json`. +4. Run `make` command on Terminal.
If you've a generator file into `src/json`, formatted json file will be auto generated in the `public/json/your_awesome_configuration.json`. ```shell make diff --git a/core b/core new file mode 160000 index 000000000..6165ec387 --- /dev/null +++ b/core @@ -0,0 +1 @@ +Subproject commit 6165ec387ae53e4590fbf51fdf0f468cc88bdb49