This commit is contained in:
Daniel Flanagan 2021-11-08 23:20:01 -06:00
parent 8f1fbd2089
commit 3cd86e1189
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
17 changed files with 254 additions and 75 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "planck/lib/qmk_firmware"] [submodule "planck/lib/qmk_firmware"]
path = planck/lib/qmk_firmware path = planck/lib/qmk_firmware
url = https://github.com/lytedev/qmk_firmware.git url = https://github.com/lytedev/qmk_firmware.git
[submodule "zofle/3d/ScrewsMetric"]
path = zofle/3d/ScrewsMetric
url = https://github.com/More-Wrong/ScrewsMetric.git

View file

@ -26,101 +26,59 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( [_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_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, 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, 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_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 KC_LGUI, KC_SPC, MO(_LEFT), MO(_RIGHT),KC_SPC, KC_LALT
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_GAMER] = LAYOUT( [_GAMER] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_RETRO_GAMER] = LAYOUT( [_RETRO_GAMER] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_LEFT] = LAYOUT( [_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_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_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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, _______, _______, MO(_ADJUST),KC_ENT, _______ _______, _______, _______, MO(_ADJUST),KC_ENT, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_RIGHT] = LAYOUT( [_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_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_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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, KC_LALT,MO(_ADJUST), _______, _______, _______ _______, KC_LALT,MO(_ADJUST), _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_ADJUST] = LAYOUT( [_ADJUST] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
_______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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_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_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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
), ),
[_CONFIG] = LAYOUT( [_CONFIG] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
RESET, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, RESET,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
PADJUST, QWERTY, RGB_TOG, _______, GAMER, RETRO_GAMER PADJUST, QWERTY, RGB_TOG, _______, GAMER, RETRO_GAMER
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
) )
}; };

View file

@ -1,6 +1,19 @@
# keyboards # keyboards
+ [Planck](planck) - [Planck](planck)
+ [Iris](iris) - [Iris](iris)
+ [Splyte](splyte) - [Splyte (Handwired Custom)](splyte)
+ [Zorne](zorne) - [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?

2
zofle/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/.cache
/build

1
zofle/3d/ScrewsMetric Submodule

@ -0,0 +1 @@
Subproject commit 3deb454afebf33e8b47e4e0ac96f6f4abd584cb7

5
zofle/3d/washer.scad Normal file
View file

@ -0,0 +1,5 @@
include <ScrewsMetric/ScrewsMetric/ScrewsMetric.scad>;
$fn = 30;
GHOST = true;
FormAWasher(M2);

18
zofle/build.fish Executable file
View file

@ -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'

12
zofle/config/sofle.conf Normal file
View file

@ -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

91
zofle/config/sofle.keymap Normal file
View file

@ -0,0 +1,91 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#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>;
};
};
};

11
zofle/config/west.yml Normal file
View file

@ -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

30
zofle/flash.fish Executable file
View file

@ -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!

15
zofle/makefile Normal file
View file

@ -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

View file

@ -4,7 +4,7 @@ docker run -it --rm \
-v (pwd)/.cache:/zorne \ -v (pwd)/.cache:/zorne \
-v (pwd)/config:/zorne/config:ro \ -v (pwd)/config:/zorne/config:ro \
-v (pwd)/build:/build \ -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 init -l config
west update west update
west zephyr-export west zephyr-export

View file

@ -1,8 +1,12 @@
# Uncomment the following lines to enable the Corne RGB Underglow CONFIG_EC11=n
# CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=n
# CONFIG_WS2812_STRIP=y
# Uncomment the following line to enable the Corne OLED Display CONFIG_ZMK_RGB_UNDERGLOW=n
# CONFIG_ZMK_DISPLAY=y 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 CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

View file

@ -8,6 +8,9 @@
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h> #include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#define CAN_DEFINE 1
&mt { &mt {
tapping-term-ms = <200>; tapping-term-ms = <200>;
@ -55,7 +58,7 @@
&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 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 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 &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 { right_layer {
@ -80,7 +83,7 @@
// ------------------| | | | | | | |------------------ // ------------------| | | | | | | |------------------
// ------------------- ------------------- // ------------------- -------------------
bindings = < 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 &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 &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 &trans &trans &trans &trans &trans &trans
@ -88,31 +91,31 @@
}; };
config_layer { config_layer {
// ------------------------------------- ------------------------------------- // ------------------------------------- -------------------------------------
// | | PWR | | | | | | | | | | PWR | |
// |BTCLR| | | | | | | | | | | | | // |BTCLR| | | | | | | | | | | | |
// | | | | | | | | | | | | | |
// |RESET| | | | | | | | | | | |RESET| // |RESET| | | | | | | | | | | |RESET|
// ------------------| |SUPER| | | |SUPER| |------------------ // ------------------| |SUPER| | | |SUPER| |------------------ // TODO: Super layer (all thumb keys?)
// ------------------- ------------------- // ------------------- -------------------
bindings = < bindings = <
&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 &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 &reset &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &reset
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>; >;
}; };
super_layer { // super_layer {
// ------------------------------------- ------------------------------------- // ------------------------------------- -------------------------------------
// | | | | | | | | | | | | | | // | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | // | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | // | | | | | | | | | | | | | |
// ------------------| | | | | | | |------------------ // ------------------| | | | | | | |------------------
// ------------------- ------------------- // ------------------- -------------------
bindings = < //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 &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
>; //>;
}; //};
}; };
}; };

View file

@ -5,13 +5,26 @@ test (whoami) != root && begin
exit 1 exit 1
end end
set flash_target /dev/disk/by-label/NICENANO
set firmware_file $argv[1]
mkdir -p /tmp/flashmnt mkdir -p /tmp/flashmnt
echo Mounting $argv[1] to /tmp/flashmnt... while not test -L $flash_target
mount $argv[1] /tmp/flashmnt # arg 1 echo Waiting for mountable device $flash_target to become available...
echo Copying $argv[2] to /tmp/flashmnt... echo " This usually means you need to plugin the board and reset it."
cp $argv[2] /tmp/flashmnt 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... echo Syncing...
sync sync
echo Unmounting /tmp/flashmnt... echo Unmounting /tmp/flashmnt...
umount -R /tmp/flashmnt umount -R /tmp/flashmnt
echo Done! echo Done!

View file

@ -3,7 +3,7 @@ build:
@fish build.fish @fish build.fish
flash-left: 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: 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