diff options
author | jack <[email protected]> | 2022-07-28 13:20:45 -0600 |
---|---|---|
committer | jack <[email protected]> | 2022-07-28 13:21:56 -0600 |
commit | 9714fc5047026416d5afabda9f122b02101521b9 (patch) | |
tree | fad0894b740d35b2c9e6f465e0aed286973a5bda | |
parent | dc3ade2322ad88b983c72b1a977bef9edd02198a (diff) | |
download | zmk_build-9714fc5047026416d5afabda9f122b02101521b9.tar.gz zmk_build-9714fc5047026416d5afabda9f122b02101521b9.zip |
clean up
-rw-r--r-- | .github/workflows/build.yml | 77 | ||||
-rw-r--r-- | build.yaml | 6 | ||||
-rw-r--r-- | config/combos.h | 10 | ||||
-rw-r--r-- | config/corne.conf | 1 | ||||
-rw-r--r-- | config/corne.keymap | 70 | ||||
-rw-r--r-- | config/microdox.conf | 2 | ||||
-rw-r--r-- | config/microdox.keymap | 55 | ||||
-rw-r--r-- | config/qaz.conf | 1 | ||||
-rw-r--r-- | config/qaz.keymap | 59 | ||||
-rw-r--r-- | config/util.h | 13 |
10 files changed, 59 insertions, 235 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d71b82..d74fb89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,76 +1,5 @@ -name: Build -on: - - push - - pull_request - - workflow_dispatch +on: [push, pull_request, workflow_dispatch] + jobs: build: - runs-on: ubuntu-20.04 - container: - image: zmkfirmware/zmk-build-arm:stable - strategy: - fail-fast: false - matrix: - include: - - shield: corne_left - board: nice_nano - - shield: corne_right - board: nice_nano - - shield: microdox_left - board: nice_nano - - shield: microdox_right - board: nice_nano - - shield: qaz - board: nice_nano - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - timeout-minutes: 2 - continue-on-error: true - - name: Initialize workspace (west init) - run: west init -l config - - name: Update modules (west update) - run: west update - - name: Export Zephyr CMake package (west zephyr-export) - run: west zephyr-export - - name: Prepare variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" ]; then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk" - else - SHIELD_ARG= - ARTIFACT_NAME="${{ matrix.board }}-zmk" - fi - - echo ::set-output name=shield-arg::${SHIELD_ARG} - echo ::set-output name=artifact-name::${ARTIFACT_NAME} - - name: Build (west build) - run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} - -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" - - name: Generated DTS file - if: always() - run: cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: ${{ steps.variables.outputs.artifact-name }} - path: build/zephyr/zmk.uf2 - continue-on-error: true + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..7f8e93f --- /dev/null +++ b/build.yaml @@ -0,0 +1,6 @@ +--- +include: + - board: nice_nano_v1 + shield: corne_left + - board: nice_nano_v2 + shield: corne_right diff --git a/config/combos.h b/config/combos.h deleted file mode 100644 index b8c6604..0000000 --- a/config/combos.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 @waffle87 -// SPDX-License-Identifier: MIT - -compatible = "zmk,combos"; -#define COMBO(name, keypress, keypos) \ - combo_##name { \ - timeout-ms = <50>; \ - bindings = <keypress>; \ - key-positions = <keypos>; \ - }; diff --git a/config/corne.conf b/config/corne.conf index 5c20661..dfa521c 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -1,2 +1 @@ CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_DISPLAY=n diff --git a/config/corne.keymap b/config/corne.keymap index adf5c48..ed26030 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -1,20 +1,46 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * SPDX-License-Identifier: MIT - */ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later #include <behaviors.dtsi> #include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/bt.h> - -&mt { - quick_tap_ms = <150>; - retro-tap; -}; +#include "util.h" / { - combos { - #include "combos.h" + keymap { + compatible = "zmk,keymap"; + base { + bindings = < + &trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &trans + &trans HRML(A, S, D, F) &kp G &kp H HRMR(J, K, L, SEMI) &trans + &trans &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &trans + &trans &mo 1 &kp SPACE &kp BSPC &trans &kp RC(RS(V)) + >; + }; + num { + bindings = < + &trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans + &trans HRML(EXCL, AT, HASH, DLLR) &kp PRCNT &kp CARET HRMR(AMPS, ASTRK, LPAR, RPAR) &trans + &trans &kp ESC &kp TAB &kp CAPS &kp TILDE &kp GRAVE &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans + &trans &trans &trans &kp C_VOL_UP &trans &trans + >; + }; + }; + + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + #binding-cells = <2>; + tapping-term-ms = <150>; + quick_tap_ms = <0>; + flavor = "tap-preffered"; + bindings = <&kp>, <&kp>; + }; + }; + + combos { + compatible = "zmk,combos"; COMBO(ENTR, &kp RET, 4 7) COMBO(QUOT, &kp SQT, 17 18) COMBO(DQUO, &kp DQT, 27 32) @@ -29,27 +55,5 @@ COMBO(UNDS, &kp UNDER, 29 30) COMBO(MINS, &kp MINUS, 16 19) COMBO(EQAL, &kp EQUAL, 15 20) - }; -}; - -/ { - keymap { - compatible = "zmk,keymap"; - base { - bindings = < - &trans &mt LALT Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &mt RALT P &trans - &trans &mt LSHFT A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &mt LSHFT SEMI &trans - &trans &mt LCTL Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RCTL FSLH &trans - &kp LGUI &mo 1 &kp SPACE &kp BSPC &kp RGUI &kp RC(RS(V)) - >; - }; - num { - bindings = < - &trans &mt LALT N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &mt RALT N0 &trans - &trans &mt LSHFT EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPERSAND &kp ASTRK &kp LPAR &mt RSHFT RPAR &trans - &trans &mt LCTL ESC &kp TAB &kp CAPS &kp TILDE &kp GRAVE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp RCTL &trans - &kp C_PREV &trans &kp C_NEXT &kp C_VOL_DN &trans &kp C_VOL_UP - >; - }; }; }; diff --git a/config/microdox.conf b/config/microdox.conf deleted file mode 100644 index 6be0e2c..0000000 --- a/config/microdox.conf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_SLEEP=y diff --git a/config/microdox.keymap b/config/microdox.keymap deleted file mode 100644 index d7a2822..0000000 --- a/config/microdox.keymap +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * SPDX-License-Identifier: MIT - */ - -#include <behaviors.dtsi> -#include <dt-bindings/zmk/keys.h> -#include <dt-bindings/zmk/bt.h> - -&mt { - quick_tap_ms = <150>; - retro-tap; -}; - -/ { - combos { - #include "combos.h" - COMBO(ENTR, &kp RET, 4 7) - COMBO(QUOT, &kp SQT, 17 18) - COMBO(DQUO, &kp DQT, 27 32) - COMBO(LBRC, &kp LBRC, 3 4) - COMBO(RBRC, &kp RBRC, 4 5) - COMBO(LBKT, &kp LBKT, 6 7) - COMBO(RBKT, &kp RBKT, 7 8) - COMBO(BKSL, &kp BSLH, 3 8) - COMBO(COLN, &kp COLON, 5 6) - COMBO(PLUS, &kp PLUS, 14 21) - COMBO(QUES, &kp QMARK, 28 31) - COMBO(UNDS, &kp UNDER, 29 30) - COMBO(MINS, &kp MINUS, 16 19) - COMBO(EQAL, &kp EQUAL, 15 20) - }; -}; - -/ { - keymap { - compatible = "zmk,keymap"; - base { - bindings = < - &mt LALT Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &mt RALT P - &mt LSHFT A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &mt RSHFT SEMI - &mt LCTL Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RCTL FSLH - &kp LGUI &mo 1 &kp SPACE &kp BSPC &mo 2 &kp RC(RS(V)) - >; - }; - num { - bindings = < - &mt LALT N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &mt RALT N0 - &mt LSHFT EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPERSAND &kp ASTRK &kp LPAR &mt RSHFT RPAR - &mt LCTL ESC &kp TAB &kp CAPS &kp TILDE &kp GRAVE &kp LEFT &kp UP &kp DOWN &kp RIGHT &kp RCTL - &kp C_PREV &trans &kp C_NEXT &kp C_VOL_DN &trans &kp C_VOL_UP - >; - }; - }; -}; diff --git a/config/qaz.conf b/config/qaz.conf deleted file mode 100644 index 1fb80fd..0000000 --- a/config/qaz.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_ZMK_SLEEP=y
\ No newline at end of file diff --git a/config/qaz.keymap b/config/qaz.keymap deleted file mode 100644 index cab631e..0000000 --- a/config/qaz.keymap +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * SPDX-License-Identifier: MIT - */ - -#include <behaviors.dtsi> -#include <dt-bindings/zmk/keys.h> -#include <dt-bindings/zmk/bt.h> - -&mt { - quick_tap_ms = <150>; -}; - -< { - quick_tap_ms = <110>; -}; - -/ { - combos { - #include "combos.h" - COMBO(ENTR, &kp RET, 3 6) - COMBO(QUOT, &kp SQT, 14 15) - COMBO(DQUO, &kp DQT, 22 26) - COMBO(LBRC, &kp LBRC, 2 3) - COMBO(RBRC, &kp RBRC, 3 4) - COMBO(LBKT, &kp LBKT, 5 6) - COMBO(RBKT, &kp RBKT, 6 7) - COMBO(BKSL, &kp BSLH, 2 7) - COMBO(COLN, &kp COLON, 4 5) - COMBO(PLUS, &kp PLUS, 11 18) - COMBO(QUES, &kp QMARK, 23 26) - COMBO(UNDS, &kp UNDER, 24 25) - COMBO(MINS, &kp MINUS, 13 16) - COMBO(EQAL, &kp EQUAL, 12 17) - }; -}; - - -/ { - keymap { - compatible = "zmk,keymap"; - base { - bindings = < - &mt LALT Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &mt RALT P - &mt LSHFT A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &mt RSHFT SEMI - &mt LCTL Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &mt RCTL DOT - &kp C_VOL_DN &kp C_PREV &kp LGUI < 1 SPACE &mt RGUI BSPC &kp RC(RS(V)) &kp C_NEXT &kp C_VOL_UP - >; - }; - num { - bindings = < - &mt LALT N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &mt RALT N0 - &mt LSHFT EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPERSAND &kp ASTRK &kp LPAR &mt RSHFT RPAR - &mt LCTL ESC &kp TAB &kp CAPS &kp TILDE &kp GRAVE &kp LEFT &kp DOWN &kp UP &mt RCTL RIGHT - &kp C_BRI_DEC &reset &bootloader &trans &kp FSLH &trans &trans &kp C_BRI_INC - >; - }; - }; -}; diff --git a/config/util.h b/config/util.h new file mode 100644 index 0000000..ceff637 --- /dev/null +++ b/config/util.h @@ -0,0 +1,13 @@ +// Copyright 2022 @waffle87 +// SPDX-License-Identifier: MIT + +compatible = "zmk,combos"; +#define COMBO(name, keypress, keypos) \ +combo_##name { \ + timeout-ms = <50>; \ + bindings = <keypress>; \ + key-positions = <keypos>; \ +}; + +#define HRML(k1,k2,k3,k4) &hm LALT k1 &hm LGUI k2 &hm LCTRL k3 &hm LSHFT k4 +#define HRMR(k1,k2,k3,k4) &hm RSHFT k1 &hm RCTRL k2 &hm RGUI k3 &hm RALT k4 |