diff --git a/.gitmodules b/.gitmodules index afd860b..aa775b6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "planck/lib/qmk_firmware"] path = planck/lib/qmk_firmware url = https://github.com/lytedev/qmk_firmware.git +[submodule "zofle/3d/ScrewsMetric"] + path = zofle/3d/ScrewsMetric + url = https://github.com/More-Wrong/ScrewsMetric.git diff --git a/iris/src/keymap.c b/iris/src/keymap.c index 3dfee3b..d2e0842 100644 --- a/iris/src/keymap.c +++ b/iris/src/keymap.c @@ -26,101 +26,59 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, MO(_CONFIG),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_LGUI, KC_SPC, MO(_LEFT), MO(_RIGHT),KC_SPC, KC_LALT - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_GAMER] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_RETRO_GAMER] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LEFT] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, MO(_ADJUST),KC_ENT, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_RIGHT] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, KC_LALT,MO(_ADJUST), _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_ADJUST] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_CONFIG] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ RESET, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, RESET, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ PADJUST, QWERTY, RGB_TOG, _______, GAMER, RETRO_GAMER - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ) }; diff --git a/readme.md b/readme.md index ec9cdfb..f599742 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,19 @@ # keyboards -+ [Planck](planck) -+ [Iris](iris) -+ [Splyte](splyte) -+ [Zorne](zorne) +- [Planck](planck) +- [Iris](iris) +- [Splyte (Handwired Custom)](splyte) +- [Zorne (ZMK + Chocolate Corne)](zorne) +- [Zofle (ZMK + Sofle RGB Choc](zofle) + +# Keyboard Endgame + +- Sofle except + - Offset thumb keys like Corne (drop a key if needed?) + - Integrated battery connector on PCB + - Integrated power switch on PCB + - Roller encoder? Tiny touchpad? + - EVQWGD001: https://www.aliexpress.com/wholesale?SearchText=evqwgd001 + - Compatible with common OLED shields? + - I/O expander instead of diode matrix? + - More-exaggerated pinky stagger? diff --git a/zofle/.gitignore b/zofle/.gitignore new file mode 100644 index 0000000..a6c2198 --- /dev/null +++ b/zofle/.gitignore @@ -0,0 +1,2 @@ +/.cache +/build diff --git a/zofle/3d/ScrewsMetric b/zofle/3d/ScrewsMetric new file mode 160000 index 0000000..3deb454 --- /dev/null +++ b/zofle/3d/ScrewsMetric @@ -0,0 +1 @@ +Subproject commit 3deb454afebf33e8b47e4e0ac96f6f4abd584cb7 diff --git a/zofle/3d/washer.scad b/zofle/3d/washer.scad new file mode 100644 index 0000000..b78c862 --- /dev/null +++ b/zofle/3d/washer.scad @@ -0,0 +1,5 @@ +include ; +$fn = 30; +GHOST = true; + +FormAWasher(M2); diff --git a/zofle/build.fish b/zofle/build.fish new file mode 100755 index 0000000..9deecd9 --- /dev/null +++ b/zofle/build.fish @@ -0,0 +1,18 @@ +#!/usr/bin/env fish + +set -q ZMK_DOCKER_IMAGE || set ZMK_DOCKER_IMAGE zmkfirmware/zmk-build-arm:2.5 + +docker run -it --rm \ + -v (pwd)/.cache:/zofle \ + -v (pwd)/config:/zofle/config:ro \ + -v (pwd)/build:/build \ + $ZMK_DOCKER_IMAGE sh -c 'cd /zofle + west init -l config + west update + west zephyr-export + echo "Building left" + west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=sofle_left -DZMK_CONFIG="/zofle/config" + cp /zofle/build/zephyr/zmk.uf2 /build/sofle_left_nice_nano.uf2 + echo "Building right" + west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=sofle_right -DZMK_CONFIG="/zofle/config" + cp /zofle/build/zephyr/zmk.uf2 /build/sofle_right_nice_nano.uf2' diff --git a/zofle/config/sofle.conf b/zofle/config/sofle.conf new file mode 100644 index 0000000..04580b2 --- /dev/null +++ b/zofle/config/sofle.conf @@ -0,0 +1,12 @@ +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +CONFIG_ZMK_RGB_UNDERGLOW=n +CONFIG_WS2812_STRIP=n + +CONFIG_ZMK_EXT_POWER=y +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_SLEEP=y +# CONFIG_ZMK_USB_LOGGING=y + +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/zofle/config/sofle.keymap b/zofle/config/sofle.keymap new file mode 100644 index 0000000..71088fc --- /dev/null +++ b/zofle/config/sofle.keymap @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + +#define NUM_BASE_LAYERS 1 +#define LOWER_LAYER_ID (NUM_BASE_LAYERS) +#define RAISE_LAYER_ID (LOWER_LAYER_ID + 1) +#define COMBO_LAYER_ID (RAISE_LAYER_ID + 1) + +#define L_L LOWER_LAYER_ID +#define L_R RAISE_LAYER_ID +#define L_C COMBO_LAYER_ID + +&mt { + tapping-term-ms = <200>; + flavor = "hold-preferred"; +}; + +/ { + behaviors { + ht: hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "Hold Tap"; + #binding-cells = <2>; + tapping-term-ms = <200>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + 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 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 &kp 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 LALT &kp LGUI &kp SPACE &mo L_L &kp LSHFT &kp RET &mo L_R &kp SPACE &kp RALT &kp RSHFT + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>; + }; + + lower_layer { + bindings = < +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 +&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC +&trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE +&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &trans &trans &kp LT &kp GT &kp QMARK &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>; + }; + + raise_layer { + bindings = < +&kp ESC &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC +&kp GRAV &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL +&trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH +&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &kp INS &trans &trans &trans &trans + &trans &trans &kp LALT &mo L_C &trans &trans &trans &trans &mo L_C &trans + >; + + sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp PG_UP PG_DN>; + }; + + combo_layer { + bindings = < +&bootloader &trans &trans &trans &trans &out OUT_TOG &trans &trans &trans &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 +&ext_power EP_TOG &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_TOG +&bt BT_CLR &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 + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; +}; + diff --git a/zofle/config/west.yml b/zofle/config/west.yml new file mode 100644 index 0000000..379d291 --- /dev/null +++ b/zofle/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 diff --git a/zofle/flash.fish b/zofle/flash.fish new file mode 100755 index 0000000..6f6f609 --- /dev/null +++ b/zofle/flash.fish @@ -0,0 +1,30 @@ +#!/usr/bin/env fish + +test (whoami) != root && begin + echo must be root + exit 1 +end + +set flash_target /dev/disk/by-label/NICENANO +set firmware_file $argv[1] + +mkdir -p /tmp/flashmnt +while not test -L $flash_target + echo Waiting for mountable device $flash_target to become available... + echo " This usually means you need to plugin the board and reset it." + sleep 1 +end + +echo Mounting $flash_target to /tmp/flashmnt... +mount $flash_target /tmp/flashmnt + +echo Copying $firmware_file to /tmp/flashmnt... +cp $firmware_file /tmp/flashmnt + +echo Syncing... +sync + +echo Unmounting /tmp/flashmnt... +umount -R /tmp/flashmnt + +echo Done! diff --git a/zofle/makefile b/zofle/makefile new file mode 100644 index 0000000..0ed293a --- /dev/null +++ b/zofle/makefile @@ -0,0 +1,15 @@ +.PHONY: build sleep +build: + @fish build.fish + +flash-left: + @sudo fish flash.fish ./build/sofle_left_nice_nano.uf2 + +flash-right: + @sudo fish flash.fish ./build/sofle_right_nice_nano.uf2 + +sleep: + echo "Sleeping for 2 seconds for disks to fully sync and unmount..." + @sleep 2 + +everything: build flash-left sleep flash-right diff --git a/zorne/build.fish b/zorne/build.fish index 97b9c07..640fbe8 100755 --- a/zorne/build.fish +++ b/zorne/build.fish @@ -4,7 +4,7 @@ docker run -it --rm \ -v (pwd)/.cache:/zorne \ -v (pwd)/config:/zorne/config:ro \ -v (pwd)/build:/build \ - zmkfirmware/zmk-build-arm:2.4 sh -c 'cd /zorne + zmkfirmware/zmk-build-arm:2.5 sh -c 'cd /zorne west init -l config west update west zephyr-export diff --git a/zorne/config/corne.conf b/zorne/config/corne.conf index 6c21265..a8f498c 100644 --- a/zorne/config/corne.conf +++ b/zorne/config/corne.conf @@ -1,8 +1,12 @@ -# Uncomment the following lines to enable the Corne RGB Underglow -# CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y +CONFIG_EC11=n +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=n -# Uncomment the following line to enable the Corne OLED Display -# CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_RGB_UNDERGLOW=n +CONFIG_WS2812_STRIP=n + +CONFIG_ZMK_EXT_POWER=n +CONFIG_ZMK_DISPLAY=n +CONFIG_ZMK_SLEEP=y +# CONFIG_ZMK_USB_LOGGING=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/zorne/config/corne.keymap b/zorne/config/corne.keymap index fcce9ac..7458a0e 100644 --- a/zorne/config/corne.keymap +++ b/zorne/config/corne.keymap @@ -8,6 +8,9 @@ #include #include #include +#include + +#define CAN_DEFINE 1 &mt { tapping-term-ms = <200>; @@ -55,14 +58,14 @@ &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp LT &kp GT &kp QMARK &kp TILDE - &mo 4 &trans &trans &mo 3 &kp RET &trans + &mo 3 &trans &trans &mo 3 &kp RET &trans >; }; right_layer { // ------------------------------------- ------------------------------------- // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | // | | | | | | | | | - | = | [ | ] | \ | - // | SHFT| | | | | | | INS | | | | | | + // | SHFT| | | | | | | INS | | | | | | // ------------------| | ALT | ADJ | | | | ADJ |------------------ // ------------------- ------------------- bindings = < @@ -80,7 +83,7 @@ // ------------------| | | | | | | |------------------ // ------------------- ------------------- bindings = < - &mo 4 &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp K_PP &kp C_VOL_UP &kp C_NEXT &trans + &mo 4 &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp K_PP &kp C_VOL_UP &kp C_NEXT &mo 4 &trans &trans &trans &trans &trans &out OUT_USB &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp HOME &kp PGDN &kp PGUP &kp END &trans &trans &trans &trans &trans &trans &trans &trans @@ -88,31 +91,31 @@ }; config_layer { // ------------------------------------- ------------------------------------- + // | | PWR | | | | | | | | | | PWR | | // |BTCLR| | | | | | | | | | | | | - // | | | | | | | | | | | | | | // |RESET| | | | | | | | | | | |RESET| - // ------------------| |SUPER| | | |SUPER| |------------------ + // ------------------| |SUPER| | | |SUPER| |------------------ // TODO: Super layer (all thumb keys?) // ------------------- ------------------- bindings = < - &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &reset &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &reset - &trans &trans &trans &trans &trans &trans + &trans &ext_power EP_TOG &trans &trans &trans &trans &trans &trans &trans &trans &ext_power EP_TOG &trans + &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &reset &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &reset + &trans &trans &trans &trans &trans &trans >; }; - super_layer { + // super_layer { // ------------------------------------- ------------------------------------- // | | | | | | | | | | | | | | // | | | | | | | | | | | | | | // | | | | | | | | | | | | | | // ------------------| | | | | | | |------------------ // ------------------- ------------------- - bindings = < - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans - >; - }; + //bindings = < + // &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + // &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + // &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + // &trans &trans &trans &trans &trans &trans + //>; + //}; }; }; diff --git a/zorne/flash.fish b/zorne/flash.fish index 637b790..6f6f609 100755 --- a/zorne/flash.fish +++ b/zorne/flash.fish @@ -5,13 +5,26 @@ test (whoami) != root && begin exit 1 end +set flash_target /dev/disk/by-label/NICENANO +set firmware_file $argv[1] + mkdir -p /tmp/flashmnt -echo Mounting $argv[1] to /tmp/flashmnt... -mount $argv[1] /tmp/flashmnt # arg 1 -echo Copying $argv[2] to /tmp/flashmnt... -cp $argv[2] /tmp/flashmnt +while not test -L $flash_target + echo Waiting for mountable device $flash_target to become available... + echo " This usually means you need to plugin the board and reset it." + sleep 1 +end + +echo Mounting $flash_target to /tmp/flashmnt... +mount $flash_target /tmp/flashmnt + +echo Copying $firmware_file to /tmp/flashmnt... +cp $firmware_file /tmp/flashmnt + echo Syncing... sync + echo Unmounting /tmp/flashmnt... umount -R /tmp/flashmnt + echo Done! diff --git a/zorne/makefile b/zorne/makefile index 457c5d2..fc3dfbb 100644 --- a/zorne/makefile +++ b/zorne/makefile @@ -3,7 +3,7 @@ build: @fish build.fish flash-left: - @sudo fish flash.fish /dev/disk/by-label/NICENANO ./build/corne_left_nice_nano.uf2 + @sudo fish flash.fish ./build/corne_left_nice_nano.uf2 flash-right: - @sudo fish flash.fish /dev/disk/by-label/NICENANO ./build/corne_right_nice_nano.uf2 + @sudo fish flash.fish ./build/corne_right_nice_nano.uf2