Skip to content

Commit

Permalink
Merge pull request #3 from raeedcho/actions-fix
Browse files Browse the repository at this point in the history
Rework GitHub workflows
  • Loading branch information
raeedcho authored Apr 22, 2024
2 parents 851b68e + d7aecf9 commit 2a001b4
Show file tree
Hide file tree
Showing 21 changed files with 208 additions and 152 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
name: build firmware

on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
doc:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install keymap_drawer
- name: 'Parse ZMK keymap'
run: keymap -c ./keymap_img/temper_keymap_config.yaml parse -c 10 -z ./config/boards/shields/temper/temper.keymap --base-keymap ./keymap_img/temper_keymap_base.yaml > ./keymap_img/temper_keymap.yaml
- name: 'Draw keymap'
run: keymap -c ./keymap_img/temper_keymap_config.yaml draw --select-layers default num nav fun -k chocofi ./keymap_img/temper_keymap.yaml > ./keymap_img/temper_keymap.svg
- name: 'Commit keymap image'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add ./keymap_img/temper_keymap.svg
git commit -m 'doc: update keymap image'
continue-on-error: true
- name: 'Push keymap image'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
25 changes: 25 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: draw keymap

on:
workflow_dispatch: # can be triggered manually
push: # automatically run on changes to following paths
paths:
- ".github/workflows/doc.yml"
- "keymap_img/keymap_drawer.config.yaml"
- "config/*.keymap"
- "config/*.dtsi"
- "boards/*/*/*.keymap"
- "boards/*/*/*.dtsi"

jobs:
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
permissions:
contents: write # allow workflow to commit to the repo
with:
commit_message: "doc: update keymap image" # commit message for the changes
keymap_patterns: "boards/*/*/*.keymap" # path to the keymaps to parse
config_path: "keymap_img/keymap_drawer.config.yaml" # config file, ignored if it does not exist
output_folder: "keymap_img" # path to save produced SVG and keymap YAML files
parse_args: "temper:'-c 10'" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''"
draw_args: "temper:'-k chocofi -s default num nav fun'" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Temper ZMK Config

This is my personal ZMK config for the [temper](https://github.com/raeedcho/chocofi-temper).
This is my personal ZMK config for the [temper](https://github.com/raeedcho/temper).

Some notes about this config:
- Four main layers (default, numbers/symbols, navigation, and function)
- Default layer is Colemak DHm, but there's also a QWERTY layer that can be toggled on
- Navigation layer has vim-like arrow keys

![Temper Keymap](keymap_img/temper_keymap.svg)
![Temper Keymap](keymap_img/temper.svg)
16 changes: 16 additions & 0 deletions boards/shields/temper/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if SHIELD_TEMPER_LEFT

config ZMK_KEYBOARD_NAME
default "temper"

config ZMK_SPLIT_ROLE_CENTRAL
default y

endif

if SHIELD_TEMPER_LEFT || SHIELD_TEMPER_RIGHT

config ZMK_SPLIT
default y

endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,57 +26,49 @@
behaviors {
bspc_del: backspace_delete {
compatible = "zmk,behavior-mod-morph";
label = "BACKSPACE_DELETE";
#binding-cells = <0>;
bindings = <&kp BACKSPACE>, <&kp DELETE>;
mods = <(MOD_LSFT|MOD_RSFT)>;
keep-mods = <(MOD_RSFT)>;
};
super_bspc: super_backspace {
compatible = "zmk,behavior-mod-morph";
label = "SUPER_BACKSPACE";
#binding-cells = <0>;
bindings = <&kp BACKSPACE>, <&kp LA(BACKSPACE)>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
smart_shft: smart_shift {
compatible = "zmk,behavior-mod-morph";
label = "SMART_SHIFT";
#binding-cells = <0>;
bindings = <&kp LSHFT>, <&caps_word>;
mods = <(MOD_LSFT)>;
};
comma_semi: comma_semi {
compatible = "zmk,behavior-mod-morph";
label = "COMMA_SEMI";
#binding-cells = <0>;
bindings = <&kp COMMA>, <&kp SEMI>;
mods = <(MOD_LSFT)>;
};
dot_colon: dot_colon {
compatible = "zmk,behavior-mod-morph";
label = "DOT_COLON";
#binding-cells = <0>;
bindings = <&kp DOT>, <&kp COLON>;
mods = <(MOD_LSFT)>;
};
qmrk_excl: qmrk_excl {
compatible = "zmk,behavior-mod-morph";
label = "QUESTION_EXCLAMATION";
#binding-cells = <0>;
bindings = <&kp QMARK>, <&kp EXCL>;
mods = <(MOD_LSFT)>;
};
slh_morph: slh_morph {
compatible = "zmk,behavior-mod-morph";
label = "SLASH_MORPH";
#binding-cells = <0>;
bindings = <&kp FSLH>, <&kp BSLH>;
mods = <(MOD_LSFT)>;
};
amps_morph: amps_morph {
compatible = "zmk,behavior-mod-morph";
label = "AMPERSAND_MORPH";
#binding-cells = <0>;
bindings = <&kp AMPS>, <&kp PIPE>;
mods = <(MOD_LSFT)>;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 0 additions & 46 deletions config/boards/shields/temper/Kconfig.defconfig

This file was deleted.

File renamed without changes.
File renamed without changes
159 changes: 159 additions & 0 deletions keymap_img/temper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
layers:
default:
- - Q
- W
- F
- P
- B
- J
- L
- U
- Y
- {t: '''', s: '"'}
- [A, R, S, T, G, M, N, E, I, O]
- - Z
- X
- C
- D
- V
- K
- H
- {t: ',', s: ;}
- {t: ., s: ':'}
- {t: '?', s: '!'}
- - ⌘
- num
- {t: ⇧, s: ⇪}
- SPACE
- nav
- {t: BACKSPACE, s: Alt+ BACKSPACE}
qwerty:
- [Q, W, E, R, T, Y, U, I, O, P]
- - A
- S
- D
- F
- G
- H
- J
- K
- L
- {t: ;, s: ':'}
- - Z
- X
- C
- V
- B
- N
- M
- {t: ',', s: <}
- {t: ., s: '>'}
- /
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
num:
- - '~'
- '@'
- '{'
- '}'
- '%'
- '*'
- '7'
- '8'
- '9'
- {t: '-', s: _}
- [^, '#', (, ), $, _, '4', '5', '6', +]
- - {t: '&', s: '|'}
- <
- {t: '[', s: '{'}
- {t: ']', s: '}'}
- '>'
- {t: /, s: \}
- '1'
- '2'
- '3'
- {t: '=', s: +}
- - {t: ▽, type: trans}
- {type: held}
- {t: ▽, type: trans}
- '0'
- {t: ▽, type: trans}
- {t: ▽, type: trans}
nav:
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- HOME
- END
-
- {t: BACKSPACE, s: Alt+ BACKSPACE}
- - {t: ⇧, h: sticky}
- {t: ⌃, h: sticky}
- {t: ⎇, h: sticky}
- {t: ⌘, h: sticky}
-
-
-
-
-
- {t: ESC, s: '`'}
- - {t: ▽, type: trans}
- DEL
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- RET
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {type: held}
- {t: ▽, type: trans}
fun:
- - {t: qwerty, h: toggle}
- MUTE
- VOL DN
- VOL UP
- OUT TOG
- {t: ▽, type: trans}
- F7
- F8
- F9
- F12
- - {t: BT, h: '0'}
- {t: BT, h: '1'}
- {t: BT, h: '2'}
- {t: BT, h: '3'}
- {t: BT, h: '4'}
- {t: ▽, type: trans}
- F4
- F5
- F6
- F11
- - BT CLR
- PREV
- PP
- NEXT
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- F1
- F2
- F3
- F10
- - {t: ▽, type: trans}
- {type: held}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {type: held}
- {t: ▽, type: trans}
Loading

0 comments on commit 2a001b4

Please sign in to comment.