diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca7ae59c..46eef275 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,31 +1,7 @@ +name: build firmware + on: [push, pull_request, workflow_dispatch] jobs: build: - uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main - doc: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - run: pip install keymap_drawer - - name: 'Parse ZMK keymap' - run: keymap -c ./keymap_img/temper_keymap_config.yaml parse -c 10 -z ./config/boards/shields/temper/temper.keymap --base-keymap ./keymap_img/temper_keymap_base.yaml > ./keymap_img/temper_keymap.yaml - - name: 'Draw keymap' - run: keymap -c ./keymap_img/temper_keymap_config.yaml draw --select-layers default num nav fun -k chocofi ./keymap_img/temper_keymap.yaml > ./keymap_img/temper_keymap.svg - - name: 'Commit keymap image' - run: | - git config --global user.name 'GitHub Actions' - git config --global user.email 'actions@github.com' - git add ./keymap_img/temper_keymap.svg - git commit -m 'doc: update keymap image' - continue-on-error: true - - name: 'Push keymap image' - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main \ No newline at end of file diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 00000000..437b79df --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,25 @@ +name: draw keymap + +on: + workflow_dispatch: # can be triggered manually + push: # automatically run on changes to following paths + paths: + - ".github/workflows/doc.yml" + - "keymap_img/keymap_drawer.config.yaml" + - "config/*.keymap" + - "config/*.dtsi" + - "boards/*/*/*.keymap" + - "boards/*/*/*.dtsi" + +jobs: + draw: + uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main + permissions: + contents: write # allow workflow to commit to the repo + with: + commit_message: "doc: update keymap image" # commit message for the changes + keymap_patterns: "boards/*/*/*.keymap" # path to the keymaps to parse + config_path: "keymap_img/keymap_drawer.config.yaml" # config file, ignored if it does not exist + output_folder: "keymap_img" # path to save produced SVG and keymap YAML files + parse_args: "temper:'-c 10'" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''" + draw_args: "temper:'-k chocofi -s default num nav fun'" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" \ No newline at end of file diff --git a/README.md b/README.md index 7e7782b7..c2e33964 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Temper ZMK Config -This is my personal ZMK config for the [temper](https://github.com/raeedcho/chocofi-temper). +This is my personal ZMK config for the [temper](https://github.com/raeedcho/temper). Some notes about this config: - Four main layers (default, numbers/symbols, navigation, and function) - Default layer is Colemak DHm, but there's also a QWERTY layer that can be toggled on - Navigation layer has vim-like arrow keys -![Temper Keymap](keymap_img/temper_keymap.svg) +![Temper Keymap](keymap_img/temper.svg) diff --git a/boards/shields/temper/Kconfig.defconfig b/boards/shields/temper/Kconfig.defconfig new file mode 100644 index 00000000..62291e5c --- /dev/null +++ b/boards/shields/temper/Kconfig.defconfig @@ -0,0 +1,16 @@ +if SHIELD_TEMPER_LEFT + +config ZMK_KEYBOARD_NAME + default "temper" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_TEMPER_LEFT || SHIELD_TEMPER_RIGHT + +config ZMK_SPLIT + default y + +endif diff --git a/config/boards/shields/temper/Kconfig.shield b/boards/shields/temper/Kconfig.shield similarity index 100% rename from config/boards/shields/temper/Kconfig.shield rename to boards/shields/temper/Kconfig.shield diff --git a/config/boards/shields/temper/boards/nice_nano.overlay b/boards/shields/temper/boards/nice_nano.overlay similarity index 100% rename from config/boards/shields/temper/boards/nice_nano.overlay rename to boards/shields/temper/boards/nice_nano.overlay diff --git a/config/boards/shields/temper/boards/nice_nano_v2.overlay b/boards/shields/temper/boards/nice_nano_v2.overlay similarity index 100% rename from config/boards/shields/temper/boards/nice_nano_v2.overlay rename to boards/shields/temper/boards/nice_nano_v2.overlay diff --git a/config/boards/shields/temper/temper.conf b/boards/shields/temper/temper.conf similarity index 100% rename from config/boards/shields/temper/temper.conf rename to boards/shields/temper/temper.conf diff --git a/config/boards/shields/temper/temper.dtsi b/boards/shields/temper/temper.dtsi similarity index 100% rename from config/boards/shields/temper/temper.dtsi rename to boards/shields/temper/temper.dtsi diff --git a/config/boards/shields/temper/temper.keymap b/boards/shields/temper/temper.keymap similarity index 98% rename from config/boards/shields/temper/temper.keymap rename to boards/shields/temper/temper.keymap index 56c741c2..aee0b995 100644 --- a/config/boards/shields/temper/temper.keymap +++ b/boards/shields/temper/temper.keymap @@ -26,7 +26,6 @@ behaviors { bspc_del: backspace_delete { compatible = "zmk,behavior-mod-morph"; - label = "BACKSPACE_DELETE"; #binding-cells = <0>; bindings = <&kp BACKSPACE>, <&kp DELETE>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -34,49 +33,42 @@ }; super_bspc: super_backspace { compatible = "zmk,behavior-mod-morph"; - label = "SUPER_BACKSPACE"; #binding-cells = <0>; bindings = <&kp BACKSPACE>, <&kp LA(BACKSPACE)>; mods = <(MOD_LSFT|MOD_RSFT)>; }; smart_shft: smart_shift { compatible = "zmk,behavior-mod-morph"; - label = "SMART_SHIFT"; #binding-cells = <0>; bindings = <&kp LSHFT>, <&caps_word>; mods = <(MOD_LSFT)>; }; comma_semi: comma_semi { compatible = "zmk,behavior-mod-morph"; - label = "COMMA_SEMI"; #binding-cells = <0>; bindings = <&kp COMMA>, <&kp SEMI>; mods = <(MOD_LSFT)>; }; dot_colon: dot_colon { compatible = "zmk,behavior-mod-morph"; - label = "DOT_COLON"; #binding-cells = <0>; bindings = <&kp DOT>, <&kp COLON>; mods = <(MOD_LSFT)>; }; qmrk_excl: qmrk_excl { compatible = "zmk,behavior-mod-morph"; - label = "QUESTION_EXCLAMATION"; #binding-cells = <0>; bindings = <&kp QMARK>, <&kp EXCL>; mods = <(MOD_LSFT)>; }; slh_morph: slh_morph { compatible = "zmk,behavior-mod-morph"; - label = "SLASH_MORPH"; #binding-cells = <0>; bindings = <&kp FSLH>, <&kp BSLH>; mods = <(MOD_LSFT)>; }; amps_morph: amps_morph { compatible = "zmk,behavior-mod-morph"; - label = "AMPERSAND_MORPH"; #binding-cells = <0>; bindings = <&kp AMPS>, <&kp PIPE>; mods = <(MOD_LSFT)>; diff --git a/config/boards/shields/temper/temper.zmk.yml b/boards/shields/temper/temper.zmk.yml similarity index 100% rename from config/boards/shields/temper/temper.zmk.yml rename to boards/shields/temper/temper.zmk.yml diff --git a/config/boards/shields/temper/temper_left.conf b/boards/shields/temper/temper_left.conf similarity index 100% rename from config/boards/shields/temper/temper_left.conf rename to boards/shields/temper/temper_left.conf diff --git a/config/boards/shields/temper/temper_left.overlay b/boards/shields/temper/temper_left.overlay similarity index 100% rename from config/boards/shields/temper/temper_left.overlay rename to boards/shields/temper/temper_left.overlay diff --git a/config/boards/shields/temper/temper_right.conf b/boards/shields/temper/temper_right.conf similarity index 100% rename from config/boards/shields/temper/temper_right.conf rename to boards/shields/temper/temper_right.conf diff --git a/config/boards/shields/temper/temper_right.overlay b/boards/shields/temper/temper_right.overlay similarity index 100% rename from config/boards/shields/temper/temper_right.overlay rename to boards/shields/temper/temper_right.overlay diff --git a/config/boards/shields/temper/Kconfig.defconfig b/config/boards/shields/temper/Kconfig.defconfig deleted file mode 100644 index b056a2b6..00000000 --- a/config/boards/shields/temper/Kconfig.defconfig +++ /dev/null @@ -1,46 +0,0 @@ -if SHIELD_TEMPER_LEFT - -config ZMK_KEYBOARD_NAME - default "Temper" - -config ZMK_SPLIT_ROLE_CENTRAL - default y - -endif - -if SHIELD_TEMPER_LEFT || SHIELD_TEMPER_RIGHT - -config ZMK_SPLIT - default y - -if ZMK_DISPLAY - -config I2C - default y - -config SSD1306 - default y - -config SSD1306_REVERSE_MODE - default y - -endif # ZMK_DISPLAY - -if LVGL - -config LV_Z_VDB_SIZE - default 64 - -config LV_Z_DPI - default 148 - -config LV_Z_BITS_PER_PIXEL - default 1 - -choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 -endchoice - -endif # LVGL - -endif diff --git a/keymap_img/temper_keymap_config.yaml b/keymap_img/keymap_drawer.config.yaml similarity index 100% rename from keymap_img/temper_keymap_config.yaml rename to keymap_img/keymap_drawer.config.yaml diff --git a/keymap_img/temper_keymap.svg b/keymap_img/temper.svg similarity index 100% rename from keymap_img/temper_keymap.svg rename to keymap_img/temper.svg diff --git a/keymap_img/temper.yaml b/keymap_img/temper.yaml new file mode 100644 index 00000000..6df0156e --- /dev/null +++ b/keymap_img/temper.yaml @@ -0,0 +1,159 @@ +layers: + default: + - - Q + - W + - F + - P + - B + - J + - L + - U + - Y + - {t: '''', s: '"'} + - [A, R, S, T, G, M, N, E, I, O] + - - Z + - X + - C + - D + - V + - K + - H + - {t: ',', s: ;} + - {t: ., s: ':'} + - {t: '?', s: '!'} + - - ⌘ + - num + - {t: ⇧, s: ⇪} + - SPACE + - nav + - {t: BACKSPACE, s: Alt+ BACKSPACE} + qwerty: + - [Q, W, E, R, T, Y, U, I, O, P] + - - A + - S + - D + - F + - G + - H + - J + - K + - L + - {t: ;, s: ':'} + - - Z + - X + - C + - V + - B + - N + - M + - {t: ',', s: <} + - {t: ., s: '>'} + - / + - - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + num: + - - '~' + - '@' + - '{' + - '}' + - '%' + - '*' + - '7' + - '8' + - '9' + - {t: '-', s: _} + - [^, '#', (, ), $, _, '4', '5', '6', +] + - - {t: '&', s: '|'} + - < + - {t: '[', s: '{'} + - {t: ']', s: '}'} + - '>' + - {t: /, s: \} + - '1' + - '2' + - '3' + - {t: '=', s: +} + - - {t: ▽, type: trans} + - {type: held} + - {t: ▽, type: trans} + - '0' + - {t: ▽, type: trans} + - {t: ▽, type: trans} + nav: + - - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - HOME + - END + - ↹ + - {t: BACKSPACE, s: Alt+ BACKSPACE} + - - {t: ⇧, h: sticky} + - {t: ⌃, h: sticky} + - {t: ⎇, h: sticky} + - {t: ⌘, h: sticky} + - ↹ + - ← + - ↓ + - ↑ + - → + - {t: ESC, s: '`'} + - - {t: ▽, type: trans} + - DEL + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - RET + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {type: held} + - {t: ▽, type: trans} + fun: + - - {t: qwerty, h: toggle} + - MUTE + - VOL DN + - VOL UP + - OUT TOG + - {t: ▽, type: trans} + - F7 + - F8 + - F9 + - F12 + - - {t: BT, h: '0'} + - {t: BT, h: '1'} + - {t: BT, h: '2'} + - {t: BT, h: '3'} + - {t: BT, h: '4'} + - {t: ▽, type: trans} + - F4 + - F5 + - F6 + - F11 + - - BT CLR + - PREV + - PP + - NEXT + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - F1 + - F2 + - F3 + - F10 + - - {t: ▽, type: trans} + - {type: held} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {type: held} + - {t: ▽, type: trans} diff --git a/keymap_img/temper_keymap_base.yaml b/keymap_img/temper_keymap_base.yaml deleted file mode 100644 index 48a91cc1..00000000 --- a/keymap_img/temper_keymap_base.yaml +++ /dev/null @@ -1,69 +0,0 @@ -layout: {qmk_keyboard: chocofi} -layers: - Nav: - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - - '' - - '' - - '' - - '' - - {t: '', type: held} - - '' - Num: - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - - '' - - '' - - '' - - '' - - '' - - {t: '', type: held} - Sym: - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - - '' - - {t: '', type: held} - - '' - - '' - - '' - - '' - Func: - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - - '' - - {t: '', type: held} - - '' - - '' - - '' - - {t: '', type: held} - Adjust: - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - ['', '', '', '', '', '', '', '', '', ''] - - - '' - - '' - - {t: '', type: held} - - '' - - '' - - '' -combos: - - p: [13, 16] - k: 'Caps - - Word' - - p: [30, 31, 32] - k: RET - a: bottom - o: 0.3 - - p: [11, 12, 13] - k: NAV - a: bottom - o: -0.25 - - p: [21, 22, 23] - k: NUM - a: bottom - o: 0.0 diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 00000000..1cc2b356 --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,3 @@ +build: + settings: + board_root: .