Skip to content

Commit 22ce254

Browse files
committed
refactor: update totem keymap and file structure for newer zephir
1 parent 7a20642 commit 22ce254

15 files changed

Lines changed: 91 additions & 175 deletions

Justfile

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ default:
22
@just --list --unsorted
33

44
config := absolute_path('config')
5+
module := absolute_path('config/zmk-user-module')
56
build := absolute_path('.build')
67
out := absolute_path('firmware')
78

@@ -11,25 +12,7 @@ _parse_combos:
1112
set -euo pipefail
1213
cconf="{{ config / 'combos.dtsi' }}"
1314
if [[ -f $cconf ]]; then
14-
# set MAX_COMBOS_PER_KEY to the most frequent combos count
15-
count=$(
16-
tail -n +10 $cconf |
17-
grep -Eo '[LR][TMBH][0-9]' |
18-
sort | uniq -c | sort -nr |
19-
awk 'NR==1{print $1}'
20-
)
21-
sed -Ei "/CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY/s/=.+/=$count/" "{{ config }}"/*.conf
22-
echo "Setting MAX_COMBOS_PER_KEY to $count"
23-
24-
# set MAX_KEYS_PER_COMBO to the most frequent key count
25-
count=$(
26-
tail -n +10 $cconf |
27-
grep -o -n '[LR][TMBH][0-9]' |
28-
cut -d : -f 1 | uniq -c | sort -nr |
29-
awk 'NR==1{print $1}'
30-
)
31-
sed -Ei "/CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO/s/=.+/=$count/" "{{ config }}"/*.conf
32-
echo "Setting MAX_KEYS_PER_COMBO to $count"
15+
echo "Combos are auto-calculated; no config updates needed."
3316
fi
3417
3518
# parse build.yaml and filter targets by expression
@@ -49,6 +32,7 @@ _build_single $board $shield $snippet *west_args:
4932
echo "Building firmware for $artifact..."
5033
west build -s zmk/app -d "$build_dir" -b $board {{ west_args }} ${snippet:+-S "$snippet"} -- \
5134
${shield:+-DSHIELD="$shield"} \
35+
-DZMK_EXTRA_MODULES="{{ module }}" \
5236
-DZMK_CONFIG="{{ config }}" \
5337
5438
if [[ -f "$build_dir/zephyr/zmk.uf2" ]]; then

build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#
1919
---
2020
include:
21-
- board: nice_nano_v2
21+
- board: nice_nano
2222
shield: splitkb_aurora_corne_left
2323
snippet: studio-rpc-usb-uart
2424
cmake-args: -DCONFIG_ZMK_STUDIO=y
25-
- board: nice_nano_v2
25+
- board: nice_nano
2626
shield: splitkb_aurora_corne_right
27-
- board: seeeduino_xiao_ble
27+
- board: xiao_ble
2828
shield: totem_left
29-
- board: seeeduino_xiao_ble
29+
- board: xiao_ble
3030
shield: totem_right

config/totem.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
CONFIG_ZMK_SLEEP=y
33
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
44

5-
# Combo config, automated by build script
6-
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6
7-
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=3
85

96
# Bluetooth tweaks
107
CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y

config/totem.keymap

Lines changed: 84 additions & 149 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)