zmk_build

ZMK code & build repository
git clone https://git.pngu.org/zmk_build
Log | Files | Refs | Submodules | README

commit 8696e33f9a1431c2046b252e87dad73ed634b15b
parent fa22ed6d9329468a4d567ece5d2b6eedcc9d9df6
Author: Jack Sangdahl <jack@pngu.org>
Date:   Mon, 17 Mar 2025 11:40:18 -0600

tidy build utilities & remove corne configuration

Diffstat:
Mbuild.sh | 23+++++++++--------------
Mbuild.yaml | 10+---------
Dconfig/corne.conf | 2--
Dconfig/corne.keymap | 54------------------------------------------------------
Mconfig/west.yml | 5-----
Mreadme.md | 2+-
6 files changed, 11 insertions(+), 85 deletions(-)

diff --git a/build.sh b/build.sh @@ -16,7 +16,7 @@ build() { if [ "$3" ]; then MODULE_CMD="-DZMK_EXTRA_MODULES=$HOME/git/zmk_build/$3" fi - west build -p always -b $2 -- -DSHIELD=$1 \ + west build -p -b $2 -- -DSHIELD=$1 \ -DZMK_CONFIG=$HOME/git/zmk_build/config $MODULE_CMD cp build/zephyr/zmk.uf2 ~/$1.uf2 ) @@ -24,36 +24,31 @@ build() { } printf "${BOLD}firmware to build${NORMAL}...\n" -printf "(1) corne\t(2) corne-ish zen\t(3) revxlp\t(4) sweep\t(5) flake\t(6) settings reset:\t" +printf "(1) corne-ish zen\t(2) revxlp\t(3) sweep\t(4) flake\t(5) settings reset:\t" read opt; case $opt in 1) - build corne_left nice_nano - build corne_right nice_nano_v2 - ;; - 2) build corneish_zen_v1_left build corneish_zen_v1_right ;; - 3) + 2) build revxlp seeeduino_xiao_ble "revxlp" ;; - 4) + 3) build splitkb_aurora_sweep_left nice_nano_v2 build splitkb_aurora_sweep_right nice_nano_v2 ;; - 5) + 4) build flake_left nice_nano_v2 "flake" build flake_right nice_nano_v2 "flake" ;; - 6) + 5) printf "${BOLD}select microcontroller${NORMAL}...\n" - printf "(1) nice nano\t(2) nice nano v2\t(3) xiao ble:\t" + printf "(1) nice nano v2\t(2) xiao ble:\t" read val; case $val in - 1) MCU="nice_nano" ;; - 2) MCU="nice_nano_v2" ;; - 3) MCU="seeeduino_xiao_ble" ;; + 1) MCU="nice_nano_v2" ;; + 2) MCU="seeeduino_xiao_ble" ;; *) printf "${RED}invalid entry${NORMAL}\n" ;; esac build settings_reset $MCU diff --git a/build.yaml b/build.yaml @@ -1,16 +1,8 @@ --- include: - - board: nice_nano - shield: corne_left - - board: nice_nano_v2 - shield: corne_right - - board: nice_nano_v2 - shield: splitkb_aurora_sweep_left - board: corneish_zen_v1_left - board: corneish_zen_v1_right - board: nice_nano_v2 shield: splitkb_aurora_sweep_right - - board: nice_nano - shield: settings_reset - board: nice_nano_v2 - shield: settings_reset + shield: splitkb_aurora_sweep_left diff --git a/config/corne.conf b/config/corne.conf @@ -1,2 +0,0 @@ -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_USB_LOGGING=n diff --git a/config/corne.keymap b/config/corne.keymap @@ -1,54 +0,0 @@ -// Copyright 2025 jack@pngu.org -// SPDX-License-Identifier: MIT -#include <behaviors.dtsi> -#include <dt-bindings/zmk/keys.h> -#include <dt-bindings/zmk/bt.h> -#include "util.h" - -/ { - keymap { - compatible = "zmk,keymap"; - 0 { - bindings = < - &none &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &none - &none HRML(A, S, D, F) &kp G &kp H HRMR(J, K, L, SEMI) &none - &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &trans - &updir &lt 1 ESC &kp SPACE &kp BSPC &lt 2 RS(RC(V)) &pnp - >; - }; - 1 { - 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 C_VOL_DN &kp TAB &kp CAPS &kp TILDE &kp GRAVE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp C_VOL_UP &trans - &none &trans &none &none &none &none - >; - }; - 2 { - bindings = < - &trans &bootloader &bt BT_NXT &none &none &none &none &none &none &none &none &trans - &trans &bt BT_CLR &bt BT_PRV &none &none &none &none &none &none &none &none &trans - &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans - &none &none &none &none &trans &none - >; - }; - }; - - combos { - compatible = "zmk,combos"; - // name output pos. - COMBO(we_eqal, &kp EQUAL, 2 3) - COMBO(er_cbkt, &td_cbrkt, 3 4) - COMBO(rt_bsls, &kp BSLH, 4 5) - COMBO(yu_quot, &kp QUOT, 6 7) - COMBO(ui_brkt, &td_brkt, 7 8) - COMBO(io_mins, &td_min_dash, 8 9) - COMBO(sd_plus, &kp PLUS, 14 15) - COMBO(df_coln, &kp COLON, 15 16) - COMBO(fg_pipe, &kp PIPE, 16 17) - COMBO(hj_dquo, &kp DQT, 18 19) - COMBO(jk_entr, &kp ENTER, 19 20) - COMBO(kl_unds, &kp UNDER, 20 21) - COMBO(fj_capw, &caps_word, 16 19) - }; -}; diff --git a/config/west.yml b/config/west.yml @@ -2,15 +2,10 @@ manifest: remotes: - name: zmkfirmware url-base: https://github.com/zmkfirmware - - name: petejohanson - url-base: https://github.com/petejohanson projects: - name: zmk remote: zmkfirmware revision: main import: app/west.yml - - name: revxlp-config - remote: petejohanson - revision: main self: path: config diff --git a/readme.md b/readme.md @@ -4,6 +4,6 @@ my [zmk](https://zmk.dev) configuration & keyboard code ![keyboard](https://i.imgur.com/bCRPsDy.jpg) ### misc -* [`util.h`](util.h) contains some simple c macros for combos, 2-key tap dance, & home-row mods. +* [`util.h`](config/util.h) contains some simple c macros for combos, 3-key tap dance, & home-row mods. * [`build.sh`](build.sh) is an interactive script to build and flash firmware using a local build environment. * **layout** is near identical to my layout [here (keymapdb)](https://keymapdb.com/keymaps/waffle87), sans a couple things like unicode.