This repository is a workspace for building ZMK firmware, based on urob's zmk-config.
Difference from urob's zmk-config:
- zmk-config is isolated per keyboard in
config/zmk-config-<keyboard>
and added as submodules - Supports extra modules for zmk-config and tests
- Dev Container support
- Tab completion for
just build
andjust flash
with fzf just flash
is added for UF2 loader (Only works on WSL with Nix, and requires PowerShell 7 installed on the host machine)- Automatically removes
.west
beforejust init
Note
keymap-drawer is not compatible with this setup.
Important
On Windows, it is recommended that the workspace be located on WSL-native location (outside of /mnt/c/
). Syncing the directory between Windows and WSL / container will result in significantly slower builds.
- Clone this repo (use
--recursive
to also clone submodules) - See VSCode Docs for Dev Conainer usage. Or, see urob's zmk-config README for Nix and direnv setup
- git clone your zmk-config into
config
cd config git clone https://github.com/your-username/zmk-config-your-keyboard cd ..
- Init and select the target config
You can omit the config name to use fzf to select the config.
just init zmk-config-your-keyboard
- Build
just build [target]
- Flash
or you can specify
just flash [target]
-r
to build before flashingjust flash [target] -r
With Dev Container or nix develop
command, tab completion is enabled by default.
Otherwise, manually run source _just_completion.bash
on Zsh to enable tab completion.
source _just_completion.bash