Skip to content

Commit

Permalink
add bootloader key
Browse files Browse the repository at this point in the history
  • Loading branch information
willpuckett committed Sep 23, 2024
1 parent 5e99976 commit 829a8af
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 3,643 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: zmk-build

on: [push, pull_request, workflow_dispatch]

jobs:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/draw-keymaps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: keymap drawer

on:
workflow_run:
workflows: ["zmk-build"]
types:
- completed
workflow_dispatch:

jobs:
draw-keymaps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pkgxdev/setup@v1
with:
+: pipx
- run: |
pipx install keymap-drawer
ls
./images/make_keymaps.sh
- name: get commit info
id: last_commit
run: |
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
- uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: '.images/*.svg'
# So the previous commit is amended instead of creating a new one when desired
# See:
# - https://github.com/stefanzweifel/git-auto-commit-action#using---amend-and---no-edit-as-commit-options
# - https://github.com/stefanzweifel/git-auto-commit-action/issues/159#issuecomment-845347950
# - https://github.com/actions/checkout
commit_author: ${{ steps.last_commit.outputs.author }}
commit_message: '${{ steps.last_commit.outputs.msg }}'
commit_options: '--amend --no-edit'
push_options: '--force-with-lease'
skip_fetch: true
5 changes: 3 additions & 2 deletions .images/make_keymaps.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash

keymap="config/boards/shields/revxlp/revxlp.keymap"
LAYOUTS=('NC' 'QWERTY' 'QWERTY_FLIP' 'ENGRAM' 'ENGRAMMER')

for l in {1..4}; do
echo "Rendering Layout ${LAYOUTS[l]}"
yml=".images/revxlp${l}.yml"
KEYMAP_zmk_preamble="#define LAYOUT ${l}" keymap parse -c 12 -z ${keymap} > "${yml}"
# keymap draw -n '33333+2 2+33333' .images/swoon.yml > .images/swoon_keymap.svg
KEYMAP_zmk_preamble="#define LAYOUT ${l}" keymap parse -z ${keymap} > "${yml}" && \
keymap draw -n '333333+3 3+333333' "${yml}" > ".images/revxlp_${LAYOUTS[l]}.svg"
rm "${yml}"
done
Loading

0 comments on commit 829a8af

Please sign in to comment.