This repository is a workspace for building ZMK firmware, based on urob's zmk-config.
Difference from urob's zmk-config:
- zmk-config can also be in subdirectory of
config/
(whileconfig/
is still supported). This enables you to have multiple zmk-configs. - 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 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
Or if you prefer to treat zmk-workspace as the root of your zmk-config,
just init config/zmk-config-your-keyboard
You can omit the config name to use fzf to select the config.just init config
- 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