Compare commits

...

9 commits
latest ... main

Author SHA1 Message Date
Nick Brassel
41ee8332d1
Fix for .clangd.
Some checks failed
Build QMK firmware / QMK Userspace Build (push) Failing after 0s
Build QMK firmware / QMK Userspace Publish (push) Failing after 0s
2025-04-22 00:05:04 +10:00
Sergey Vlasov
35edec2998
Add clangd-related entries to .gitignore (#31)
This is needed to support VS Code with clangd for userspace keymaps (in
this case `compile_commands.json` and `.cache/clangd` are located in the
`qmk_userspace` working copy).
2024-09-05 18:51:35 +10:00
Chad Skeeters
e6f22f98b2
Removes duplicated word *with* in README.md (#29) 2024-08-30 03:27:51 +01:00
arisudesu
0f10c50b4c
Add qmk config user.overlay_dir step to README.md (#23) 2024-06-12 13:00:54 +10:00
Vitaliy Zaytsev
7672002109
use containerWorkspaceFolder var and pass it to setup.sh (#12)
- folder name inside dev container is same as folder name on host
  so if it differs from qmk_userspace then setup.sh cannot be found
  and it sets incorrect user.overlay_dir
- docs https://containers.dev/implementors/json_reference/
2024-05-02 12:20:54 +01:00
Nick Brassel
6ddb67dc56 Replicate qmk/qmk_firmware#23310 2024-05-02 20:11:50 +10:00
Nick Brassel
67fac7803e
Add support for devcontainers. (#6) 2024-02-23 22:35:45 +11:00
Nick Brassel
c8dcd9291b
Point workflows at qmk/.githubs main branch (#1) 2023-11-28 16:44:02 +11:00
Nick Brassel
5212d63b29 Updated .gitignore. 2023-11-22 21:12:34 +11:00
7 changed files with 88 additions and 6 deletions

View file

@ -1,4 +1,4 @@
CompileFlags:
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
Remove: [-W*, -mcall-prologues]
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues, -D__has_include*]
Compiler: clang

View file

@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "QMK CLI",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "ghcr.io/qmk/qmk_cli",
"customizations": {
"vscode": {
"extensions": [
"amodio.toggle-excluded-files",
"EditorConfig.EditorConfig",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"bierner.github-markdown-preview",
"donjayamanne.git-extension-pack",
"ms-vscode-remote.remote-containers"
]
}
},
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/setup.sh ${containerWorkspaceFolder}"
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

23
.devcontainer/setup.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -eEuo pipefail
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m pip install qmk
rm get-pip.py
python3 -m pip install --upgrade milc
userspacePath="$1"
git config --global --add safe.directory "$userspacePath"
git submodule update --init --recursive
[ -d /workspaces/qmk_firmware ] || git clone https://github.com/qmk/qmk_firmware.git /workspaces/qmk_firmware
git config --global --add safe.directory /workspaces/qmk_firmware
qmk config user.qmk_home=/workspaces/qmk_firmware
qmk config user.overlay_dir="$userspacePath"
qmk git-submodule

View file

@ -8,13 +8,13 @@ permissions:
jobs:
build:
name: 'QMK Userspace Build'
uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@qmk-userspace
uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main
with:
qmk_repo: qmk/qmk_firmware
qmk_ref: master
publish:
name: 'QMK Userspace Publish'
uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@qmk-userspace
uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main
if: always() && !cancelled()
needs: build

15
.gitignore vendored
View file

@ -1,3 +1,16 @@
# Junk files
*.bak
*.swp
*~
.DS_Store
._*
# Firmware files
*.hex
*.bin
*.uf2
*.uf2
# clangd
compile_commands.json
.clangd/
.cache/

12
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,12 @@
// Suggested extensions
{
"recommendations": [
"amodio.toggle-excluded-files",
"EditorConfig.EditorConfig",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"bierner.github-markdown-preview",
"donjayamanne.git-extension-pack",
"ms-vscode-remote.remote-containers"
]
}

View file

@ -7,6 +7,7 @@ This is a template repository which allows for an external set of QMK keymaps to
1. Run the normal `qmk setup` procedure if you haven't already done so -- see [QMK Docs](https://docs.qmk.fm/#/newbs) for details.
1. Fork this repository
1. Clone your fork to your local machine
1. Enable userspace in QMK config using `qmk config user.overlay_dir="$(realpath qmk_userspace)"`
1. Add a new keymap for your board using `qmk new-keymap`
* This will create a new keymap in the `keyboards` directory, in the same location that would normally be used in the main QMK repository. For example, if you wanted to add a keymap for the Planck, it will be created in `keyboards/planck/keymaps/<your keymap name>`
* You can also create a new keymap using `qmk new-keymap -kb <your_keyboard> -km <your_keymap>`
@ -15,7 +16,7 @@ This is a template repository which allows for an external set of QMK keymaps to
1. Add your keymap(s) to the build by running `qmk userspace-add -kb <your_keyboard> -km <your_keymap>`
* This will automatically update your `qmk.json` file
* Corresponding `qmk userspace-remove -kb <your_keyboard> -km <your_keymap>` will delete it
* Listing the build targets can be done with with `qmk userspace-list`
* Listing the build targets can be done with `qmk userspace-list`
1. Commit your changes
## Howto build with GitHub
@ -55,4 +56,4 @@ This can also be used to control which fork is used, though only upstream `qmk_f
1. (First time only) `git submodule add https://github.com/qmk/qmk_firmware.git`
1. (To update) `git submodule update --init --recursive`
1. Commit your changes to your userspace repository
1. Commit your changes to your userspace repository