This commit is contained in:
Daniel Flanagan 2023-11-14 09:41:59 -06:00
parent 2ed4a7e534
commit 24d7cf4457
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
6 changed files with 31 additions and 19 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.log

View file

@ -1,15 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
ZMK_DOCKER_IMAGE="${ZMK_DOCKER_IMAGE:-zmkfirmware/zmk-build-arm:stable}" ZMK_DOCKER_IMAGE="${ZMK_DOCKER_IMAGE:-docker.io/zmkfirmware/zmk-build-arm:stable}"
docker run -it --rm \ if [[ -n $ZMK_PULL_DOCKER_IMAGE ]]; then
-v ${PWD}/.cache:/zofle \ docker pull "$ZMK_DOCKER_IMAGE"
-v ${PWD}/config:/zofle/config:ro \ fi
-v ${PWD}/build:/build \
mkdir -p "${PWD}/build"
mkdir -p "${PWD}/.cache"
podman run -it --rm \
-v "${PWD}/.cache:/zofle" \
-v "${PWD}/config:/zofle/config:ro" \
-v "${PWD}/build:/build" \
"$ZMK_DOCKER_IMAGE" sh -c ' "$ZMK_DOCKER_IMAGE" sh -c '
set -x set -x
set -e set -e
cd /zofle cd /zofle
git config --global --add safe.directory /zofle/zmk
west init -l config || true # allowed to fail since it will fail if already initialized west init -l config || true # allowed to fail since it will fail if already initialized
west update west update
west zephyr-export west zephyr-export

View file

@ -19,7 +19,7 @@
#define L_C COMBO_LAYER_ID #define L_C COMBO_LAYER_ID
&mt { &mt {
retro-tap; #retro-tap;
label = "Mod Tap"; label = "Mod Tap";
#binding-cells = <2>; #binding-cells = <2>;
tapping-term-ms = <200>; tapping-term-ms = <200>;
@ -46,8 +46,8 @@
bindings = < bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&mt LCTRL ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &ht LCTRL SQT &mt LCTRL ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &ht RCTRL SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp K_PP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp K_PP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &ht RSHFT RET
&kp LALT &kp LGUI &kp SPACE &mo L_L &kp LSHFT &kp RET &mo L_R &kp SPACE &kp RALT &kp RSHFT &kp LALT &kp LGUI &kp SPACE &mo L_L &kp LSHFT &kp RET &mo L_R &kp SPACE &kp RALT &kp RSHFT
>; >;
@ -63,7 +63,7 @@
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_DN PG_UP >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp RIGHT LEFT >;
}; };
lower_layer { lower_layer {
@ -75,7 +75,7 @@
&trans &mo L_C &trans &trans &trans &trans &mo L_C &kp RET &trans &trans &trans &mo L_C &trans &trans &trans &trans &mo L_C &kp RET &trans &trans
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp LEFT RIGHT>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp RIGHT LEFT>;
}; };
raise_layer { raise_layer {
@ -93,7 +93,7 @@
combo_layer { combo_layer {
bindings = < bindings = <
&bootloader &tog 1 &trans &ext_power EP_OFF &bt BT_CLR &out OUT_TOG &trans &trans &ext_power EP_OFF &trans &trans &bootloader &bootloader &tog 1 &trans &ext_power EP_OFF &bt BT_CLR &out OUT_TOG &trans &trans &ext_power EP_OFF &trans &trans &bootloader
&reset &trans &trans &trans &trans &out OUT_BLE &kp C_PREV &kp C_VOL_DN &kp K_PP &kp C_VOL_UP &kp C_NEXT &reset &sys_reset &trans &trans &trans &trans &out OUT_BLE &kp C_PREV &kp C_VOL_DN &kp K_PP &kp C_VOL_UP &kp C_NEXT &sys_reset
&ext_power EP_ON &ext_power EP_ON &trans &trans &trans &out OUT_USB &kp LEFT &kp DOWN &kp UP &kp RIGHT &ext_power EP_ON &ext_power EP_ON &ext_power EP_ON &ext_power EP_ON &trans &trans &trans &out OUT_USB &kp LEFT &kp DOWN &kp UP &kp RIGHT &ext_power EP_ON &ext_power EP_ON
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &kp HOME &kp PGDN &kp PGUP &kp END &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &kp HOME &kp PGDN &kp PGUP &kp END &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans

View file

@ -11,7 +11,9 @@ set firmware_file $argv[1]
mkdir -p /tmp/flashmnt mkdir -p /tmp/flashmnt
while not test -L $flash_target while not test -L $flash_target
echo Waiting for mountable device $flash_target to become available to flash $firmware_file... echo Waiting for mountable device $flash_target to become available to flash $firmware_file...
echo " This usually means you need to plugin the board and reset it." echo ' This usually means you need to plugin the board and reset it.'
echo ' This is done by plugging in the board and double-tapping the'
echo ' reset button with the nice!nano controllers this build uses.'
sleep 1 sleep 1
end end

View file

@ -1,3 +1,4 @@
# TODO: targets and dependencies?
.PHONY: build sleep .PHONY: build sleep
build: build:
@bash build.bash @bash build.bash
@ -12,7 +13,10 @@ sleep:
echo "Sleeping for 2 seconds for disks to fully sync and unmount..." echo "Sleeping for 2 seconds for disks to fully sync and unmount..."
@sleep 2 @sleep 2
clean: clean: pull
@sudo rm -r .cache build @sudo rm -r .cache build
everything: build flash-left sleep flash-right pull:
@docker pull docker.io/zmkfirmware/zmk-build-arm:stable
everything: pull build flash-left sleep flash-right

View file

@ -6,7 +6,7 @@ My Sofle+nice!nano_v2 keyboard.
## Setup ## Setup
You will need `fish` and `docker`. You will need `fish` and `podman`.
## Build Firmware ## Build Firmware
@ -17,12 +17,10 @@ You will need `fish` and `docker`.
You can flash your left-half: You can flash your left-half:
make flash-left make flash-left
# double-tap the reset button on the left half while plugged in
And your right-half: And your right-half:
make flash-right make flash-right
# double-tap the reset button on the right half while plugged in
### Other Flash Methods ### Other Flash Methods