Commit bb2656a63897
Changed files (4)
keyboards
keyboards
eyelash_corne
config
keyboards/keyboards/eyelash_corne/config/eyelash_corne.keymap
@@ -129,9 +129,9 @@
display-name = "QWERTY";
bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp UP &kp Y &kp U &kp I &kp O &kp P &kp LBKT
-&kp = EQUAL &hml LEFT_GUI A &hml LEFT_ALT S &hml LEFT_SHIFT D &hml LCTRL F &kp G &kp LEFT &kp ENTER &kp RIGHT &kp H &hmr RCTRL J &hmr RIGHT_SHIFT K &hmr RIGHT_ALT L &hmr RIGHT_GUI SEMICOLON &kp SQT
+&kp EQUAL &hml LEFT_GUI A &hml LEFT_ALT S &hml LEFT_SHIFT D &hml LCTRL F &kp G &kp LEFT &kp ENTER &kp RIGHT &kp H &hmr RCTRL J &hmr RIGHT_SHIFT K &hmr RIGHT_ALT L &hmr RIGHT_GUI SEMICOLON &kp SQT
&kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp SPACE &kp DOWN &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RBKT
- <1 SPACE < 2 BSPC &kp MINUS &kp RCTRL &kp LEFT_SHIFT < 3 ENTER
+ < 2 DEL < 2 SPACE < 3 BSPC &kp LEFT_SHIFT < 3 ENTER &kp RIGHT_ALT
>;
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
keyboards/keyboards/eyelash_corne.Dockerfile
@@ -0,0 +1,40 @@
+# syntax=docker/dockerfile:1.17.0
+FROM zmkfirmware/zmk-build-arm:stable AS builder
+
+COPY ./config/west.yml /workspace/zmk-config/config/
+WORKDIR /workspace/zmk-config/
+
+# Set up the west workspace
+# Initialize west, pointing to the copied zmk-config as the manifest path.
+# This assumes zmk-config contains a west.yml that pulls in the main ZMK repo.
+RUN west init -l config
+RUN west update
+RUN west zephyr-export
+
+COPY ./config/* /workspace/zmk-config/config/
+COPY . /workspace/zmk-new_corne
+
+FROM builder AS builder_left
+# Build the firmware for Corne Left
+# The --build-dir ensures output is isolated for this specific build.
+# We explicitly go into zmk-config to run the build command relative to it.
+RUN west build -s zmk/app \
+ -b eyelash_corne_left -d /tmp/left -- \
+ -DZMK_CONFIG=/workspace/zmk-config/config \
+ -DSHIELD=nice_view \
+ -DZMK_EXTRA_MODULES=/workspace/zmk-new_corne
+
+FROM builder AS builder_right
+# Build the firmware for Corne Right
+# Same as above, ensuring isolated output.
+RUN west build -s zmk/app \
+ -b eyelash_corne_right -d /tmp/right -- \
+ -DZMK_CONFIG=/workspace/zmk-config/config \
+ -DSHIELD=nice_view \
+ -DZMK_EXTRA_MODULES=/workspace/zmk-new_corne
+
+FROM scratch AS output_collector
+# No actual operations here, as 'docker buildx build --output' handles the extraction.
+# This stage just serves as a clear endpoint if you were to define explicit COPY --from.
+COPY --from=builder_right /tmp/right/zephyr/zmk.uf2 eyelash_corne_right.uf2
+COPY --from=builder_left /tmp/left/zephyr/zmk.uf2 eyelash_corne_left.uf2
keyboards/eyelash_corne.sh
@@ -1,35 +1,35 @@
#!/usr/bin/env bash
-# shellcheck disable=SC1091
set -eufo pipefail
cPWD="$(dirname $(readlink -f $0))"
-# TODO: we'll want to checkout those (ideally, using nix)
-# zmkRepo="$(readlink -f $cPWD/zmk)"
-eyeZMK="$(readlink -f $cPWD/new_corne)"
-# cd $zmkRepo/app || exit 1
-cd $eyeZMK/zephyr || exit 1
-# TODO: Need to run west init (and west update, and west zephyr-export ?) if we didn't do it yet
-# source $zmkRepo/.venv/bin/activate
source ${cPWD}/lib/functions.sh
+function build() {
+ docker build --target output_collector --output type=local,dest="firmwares" -f keyboards/eyelash_corne.Dockerfile keyboards/eyelash_corne
+}
+
function flash() {
side=${1}
id=${2}
- west build -b eyelash_corne_${side} \
- --build-dir build-${side} \
- -S studio-rpc-usb-uart -- \
- -DSHIELD=nice_view \
- -DCONFIG_ZMK_STUDIO=y \
- -DCONFIG_ZMK_STUDIO_LOCKING=n \
- -DZMK_CONFIG=$cPWD/keyboards/eyelash_corne \
- -DKEYMAP_FILE=$cPWD/keyboards/eyelash_corne/eyelash_corne.keymap #\
- # -DZMK_EXTRA_MODULES=$eyeZMK
+ echo -n "$(echo_red ) Connect ${side} side as usb storage: "
+ while [[ ! -e /dev/disk/by-id/${id} ]]; do
+ echo -n "$(echo_blue .)"
+ sleep 1
+ done
+ echo " ✅"
+ sudo umount /mnt 2>/dev/null >/dev/null || true
+ sudo mount /dev/disk/by-id/${id} /mnt
+ sudo cp -bv firmwares/eyelash_corne_${side}.uf2 /mnt/CURRENT.UF2
+ sync
+ sudo umount /mnt
}
-flash left usb-Adafruit_nRF_UF2_D9D14D5F56CF8D6F-0:0
+build
+
+# flash left usb-Adafruit_nRF_UF2_6863BEB9EE8668EC-0:0
echo "$(echo_green ) Left side is completed.."
sleep 2
-flash right usb-Adafruit_nRF_UF2_07E2C44920A78BC8-0:0
+flash right usb-Adafruit_nRF_UF2_0E9CC2AD6581EE32-0:0
echo $(echo_green ) "Right side is completed.. enjoy 🥳"
.gitignore
@@ -22,3 +22,4 @@ hardware-configuration.nix
/.pre-commit-config.yaml
.chatgpt-shell.el
.chatgpt-shell.el
+/keyboards/firmwares/