Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
amacleod committed Oct 31, 2024
2 parents 7d1f8ad + 0909696 commit 78bb79c
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 14 deletions.
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.PHONY: weejock
.PHONY: zaphod zaphod_lite
.PHONY: deploy_corne deploy_ferris deploy_weejock deploy_zaphod
.PHONY: transfer

MAKEFLAGS += --jobs=2

Expand All @@ -24,11 +25,10 @@ SPACE := $(EMPTY) $(EMPTY)
XIAO_PATH := /media/${USER}/XIAO-SENSE
NANO_PATH := /media/${USER}/NICENANO

# Uncomment WESTFLAGS and CMAKEFLAGS if using ZMK Studio.
#WESTFLAGS := -S studio-rpc-usb-uart
#CMAKEFLAGS := -DCONFIG_ZMK_STUDIO=y
WIN_DESKTOP := /mnt/c/Users/${USER}/Desktop
KBD_PARTS := corne_left corne_right cradio_left cradio_right weejock zaphod_lite

all: corne ferris zaphod
all: corne ferris weejock zaphod

corne: corne_left corne_right
ls -l ${BUILD_DIR}/corne_*/zephyr/zmk.uf2
Expand Down Expand Up @@ -61,7 +61,7 @@ deploy_ferris: ferris

weejock: EXTRA_MODULES += ${WEEJOCK_CONFIG_DIR}
weejock:
cd ${APP_DIR} && west build -d build/$@ -b seeeduino_xiao_ble -- -DSHIELD=$@ -DZMK_CONFIG=${ZMK_CONFIG_DIR}/config -DZMK_EXTRA_MODULES="$(subst $(SPACE),;,$(EXTRA_MODULES))"
cd ${APP_DIR} && west build -d build/$@ -b seeeduino_xiao_ble -S studio-rpc-usb-uart -- -DSHIELD=$@ -DCONFIG_ZMK_STUDIO=y -DZMK_CONFIG=${ZMK_CONFIG_DIR}/config -DZMK_EXTRA_MODULES="$(subst $(SPACE),;,$(EXTRA_MODULES))"

zaphod: zaphod_lite
zaphod_lite: EXTRA_MODULES += ${ZAPHOD_CONFIG_DIR} ${ZMK_AUTO_LAYER_DIR}
Expand All @@ -74,5 +74,11 @@ deploy_zaphod: zaphod_lite
@echo
cp -v ${BUILD_DIR}/zaphod_lite/zephyr/zmk.uf2 ${XIAO_PATH}/

# For getting UF2s from WSL to the Windows desktop.
transfer:
@for x in ${KBD_PARTS}; do \
if [ -d ${BUILD_DIR}/$${x} ]; then cp -v ${BUILD_DIR}/$${x}/zephyr/zmk.uf2 ${WIN_DESKTOP}/$${x}.uf2 ; fi \
done

clean:
rm -rf ${BUILD_DIR}
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ include:

- board: seeeduino_xiao_ble
shield: weejock
snippet: studio-rpc-usb-uart
2 changes: 2 additions & 0 deletions config/cradio_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Make the left half peripheral.
CONFIG_ZMK_SPLIT_ROLE_CENTRAL=n
2 changes: 2 additions & 0 deletions config/cradio_right.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Make the right half central.
CONFIG_ZMK_SPLIT_ROLE_CENTRAL=y
2 changes: 0 additions & 2 deletions config/glam-sym-nav-num-combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
// REQUIRES (from glam-util.dtsi):
// - &left_brace_bracket
// - &right_brace_bracket
// - &left_paren_angle
// - &right_paren_angle

// This file is meant to be included in the middle of a `combos` block.

Expand Down
1 change: 1 addition & 0 deletions config/weejock.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Configuration for Wee Jock
CONFIG_ZMK_STUDIO=y
46 changes: 39 additions & 7 deletions config/weejock.keymap
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

// Layer numbers
#define NUM 0
#define RAISE 1
#define EXTRA 2

/ {
keymap {
Expand All @@ -28,20 +30,50 @@
};
raise_layer { // layer 1
// ,-----------------------.
// | | | | |
// |ZMKSt| | |BTClr|
// | | | | |
// | | | | |
// | | | | |
// |#####| | : | Tab |
// `-----------------------'
bindings = <
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &kp COLON &kp TAB
&studio_unlock &trans &trans &bt_hold_clear 0 BACKSPACE
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &kp COLON &kp TAB
>;
display-name = "Raise";
display-name = "Fn";
};
extra_layer { // layer 2
bindings = <
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
&trans &trans &trans &trans
>;
display-name = "Extra";
};
};

macros {
// Clear all BT profiles. This is needed because &bt cannot be used directly from hold-taps.
bluetooth_clear_all: bluetooth_clear_all {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&bt BT_CLR_ALL>;
};
};

behaviors {
// Hold a button for over a second to clear all BT profiles.
bt_hold_clear: bt_hold_clear {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <1000>;
bindings = <&bluetooth_clear_all>, <&kp>;
};
};
};

0 comments on commit 78bb79c

Please sign in to comment.