diff --git a/keyboards/zmk-config-kmn/.github/workflows/build.yml b/keyboards/zmk-config-kmn/.github/workflows/build.yml new file mode 100644 index 00000000..fd6acad6 --- /dev/null +++ b/keyboards/zmk-config-kmn/.github/workflows/build.yml @@ -0,0 +1,64 @@ +on: [push, pull_request, workflow_dispatch] + +name: Build + +jobs: + build: + runs-on: ubuntu-latest + name: Build Test + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: cache-zephyr-modules + with: + path: | + modules/ + tools/ + zephyr/ + bootloader/ + zmk/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: West Init + uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest' + id: west-init + with: + args: 'init "-l config"' + - name: West Update + uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest' + id: west-update + with: + args: 'update' + - name: West Config Zephyr Base + uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest' + id: west-config + with: + args: 'config "--global zephyr.base-prefer configfile"' + - name: West Zephyr Export + uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest' + id: west-zephyr-export + with: + args: 'zephyr-export' + - name: West Build (Tidbit - 19 keys) + uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest' + id: west-build-tidbit_19key + with: + args: 'build "-s zmk/app -b nice_nano -- -DSHIELD=tidbit_19key -DZMK_CONFIG=/github/workspace/config"' + - name: Tidbit - 19 keys DTS File + if: ${{ always() }} + run: cat -n build/zephyr/nice_nano.dts.pre.tmp + - name: Tidbit - 19 keys Kconfig file + run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + - name: Rename zmk.uf2 + run: cp build/zephyr/zmk.uf2 tidbit_19key_nice_nano.uf2 + - name: Archive (Tidbit - 19 keys) + uses: actions/upload-artifact@v2 + with: + name: firmware + path: tidbit_19key_nice_nano.uf2 diff --git a/keyboards/zmk-config-kmn/README.md b/keyboards/zmk-config-kmn/README.md new file mode 100644 index 00000000..e1479146 --- /dev/null +++ b/keyboards/zmk-config-kmn/README.md @@ -0,0 +1,3 @@ + + +west build -p --board nice_nano -d build/tidbit/19_key -- -DSHIELD=tidbit_19key \ No newline at end of file diff --git a/keyboards/zmk-config-kmn/config/tidbit_19key.conf b/keyboards/zmk-config-kmn/config/tidbit_19key.conf new file mode 100644 index 00000000..b736c866 --- /dev/null +++ b/keyboards/zmk-config-kmn/config/tidbit_19key.conf @@ -0,0 +1,14 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable Encoders +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Enable underglow +CONFIG_ZMK_RGB_UNDERGLOW=y +# Use the STRIP config specific to the LEDs you're using +CONFIG_WS2812_STRIP=y + +# Display +CONFIG_ZMK_DISPLAY=y diff --git a/keyboards/zmk-config-kmn/config/tidbit_19key.keymap b/keyboards/zmk-config-kmn/config/tidbit_19key.keymap new file mode 100644 index 00000000..f1a89b0e --- /dev/null +++ b/keyboards/zmk-config-kmn/config/tidbit_19key.keymap @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + +&encoder_4 { + status = "okay"; +}; + +&pro_micro_i2c { + status = "okay"; +}; + +/ { + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder_4>; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &tog 1 &kp KP_NUMLOCK &kp KP_SLASH + &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_ASTERISK + &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MINUS + &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_PLUS + &kp C_MUTE &kp KP_NUMBER_0 &kp KP_DOT &kp KP_ENTER + >; + + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; + + func_layer { + bindings = < + &tog 0 &reset &bootloader + &out OUT_TOG &out OUT_USB &out OUT_BLE &none + &rgb_ug RGB_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR + &ext_power EXT_POWER_TOGGLE_CMD &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 + &kp C_MUTE &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 + >; + + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; + }; +}; diff --git a/keyboards/zmk-config-kmn/config/west.yml b/keyboards/zmk-config-kmn/config/west.yml new file mode 100644 index 00000000..379d2919 --- /dev/null +++ b/keyboards/zmk-config-kmn/config/west.yml @@ -0,0 +1,11 @@ +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + projects: + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml + self: + path: config