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 buildandjust flashwith fzf just flashis added for UF2 loader (Only works on Winodws(WSL) or macOS with Nix)- Automatically removes
.westbeforejust 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
- 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
configcd 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]
-rto 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