Skip to content

Commit 3e414aa

Browse files
committed
chore: cleanup draw script, gh actions, README, unused files
1 parent 7a156ee commit 3e414aa

File tree

9 files changed

+57
-1534
lines changed

9 files changed

+57
-1534
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: Deploy to Pages
2-
3-
# Can only be triggered manually
4-
on: workflow_dispatch
2+
on: workflow_dispatch # Can only be triggered manually
53

64
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
75
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.

.github/workflows/draw.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Simple workflow for drawing the keymap and deploying static content to GitHub Pages
21
name: Draw keymap
3-
42
on:
53
workflow_dispatch: # can be triggered manually
64
push:
@@ -27,6 +25,5 @@ jobs:
2725
keymap_patterns: "config/corneish_zen.keymap" # path to the keymaps to parse
2826
config_path: "keymap-drawer/config.yaml" # config file, ignored if it doesn't exist
2927
output_folder: "img" # path to save produced SVGs
30-
# commit_message: "Draw: ${{ github.event.head_commit.message }}"
31-
amend_commit: true # whether to amend the commit or create a new one
28+
commit_message: "chore(draw): keymap"
3229
fail_on_error: true

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# 👊 Knucklehead
22

3-
[![Build ZMK firmware](https://github.com/minusfive/zmk-config/actions/workflows/build.yml/badge.svg)](https://github.com/minusfive/zmk-config/actions/workflows/build.yml) [![Draw keymap](https://github.com/minusfive/zmk-config/actions/workflows/draw.yml/badge.svg)](https://github.com/minusfive/zmk-config/actions/workflows/draw.yml)
4-
53
Knucklehead[^1] is a mnemonic, macOS-optimized, 42 key ergonomic columnar layout for [corne-style split keyboards](https://github.com/foostan/crkbd), designed[^2] to ease the transition from standard ANSI Apple-style keyboards.
64

7-
> [!WARNING]\
8-
> [Home Row Mods](#timer-less-home-row-mods) are now the default. Previous version available on the [legacy branch](https://github.com/minusfive/zmk-config/tree/legacy).
5+
> [!WARNING]
96
>
107
> Under **_active development_**. Expect breaking changes and scarce/incomplete documentation.
118
12-
<img src="./img/corneish_zen.svg" alt="minusfive's keymap layout graphical representation" width="100%" />
9+
[![Build ZMK firmware](https://github.com/minusfive/zmk-config/actions/workflows/build.yml/badge.svg)](https://github.com/minusfive/zmk-config/actions/workflows/build.yml) [![Draw keymap](https://github.com/minusfive/zmk-config/actions/workflows/draw.yml/badge.svg)](https://github.com/minusfive/zmk-config/actions/workflows/draw.yml)
1310

14-
![minusfive's Corne-ish Zen](img/corneish_zen.png)
11+
<img src="./img/corneish_zen.svg" alt="Knucklehead keymap layout graphical representation" width="100%" />
1512

1613
> Drawn with [@caksoylar's Keymap Drawer](https://github.com/caksoylar/keymap-drawer)
1714
15+
> [!IMPORTANT]
16+
>
17+
> [Home Row Mods](#timer-less-home-row-mods) are now the default. Previous version available on the [legacy branch](https://github.com/minusfive/zmk-config/tree/legacy).
18+
1819
## Legend
1920

2021
| Symbol | Key Name | Symbol | Key Name |
@@ -35,8 +36,15 @@ Knucklehead[^1] is a mnemonic, macOS-optimized, 42 key ergonomic columnar layout
3536

3637
### Mnemonic Affordances
3738

38-
> [!NOTE]\
39-
> These are **optimized for the [Colemak-DH](https://colemakmods.github.io/mod-dh/)** layout. While many will work well regardless of layout, others will be "lost in translation".
39+
> [!NOTE]
40+
>
41+
> These are **optimized for the [Colemak-DH](https://colemakmods.github.io/mod-dh/)** layout (default). However, most should still work well regardless of layout, while others will be "lost in translation".
42+
>
43+
> Other layouts available:
44+
>
45+
> - [Colemak](./knucklehead/L1_colemak.dtsi) (classic)
46+
> - [Dvorak](./knucklehead/L1_dvorak.dtsi)
47+
> - [QWERTY](./knucklehead/L1_qwerty.dtsi)
4048
>
4149
> See: [Using layouts other than Colemak-DH](#using-layouts-other-than-colemak-dh)
4250
@@ -91,7 +99,8 @@ Together with the [single base layer](#single-base-layer) and [upper layer swapp
9199

92100
By using [@urob's Timer-less](https://github.com/urob/zmk-config?tab=readme-ov-file#timeless-homerow-mods) [Home Row Mods](https://precondition.github.io/home-row-mods), modifier keys (``, ``, ``, ``) can be activated by holding keys in the "home row", consistently across layers, without interfering with normal typing (i.e. without the need to tap a key within a certain time window).
93101

94-
> [!NOTE]\
102+
> [!NOTE]
103+
>
95104
> To hold-repeat a key in the home row (or any other dual-purpose key), simply tap it twice and hold.
96105
97106
---
@@ -104,7 +113,8 @@ The most common example of this type of behavior is [ZMK's `&caps_word`](https:/
104113

105114
This layout uses 2 smart word behaviors (marked with the 🆆 symbol):
106115

107-
> [!NOTE]\
116+
> [!NOTE]
117+
>
108118
> Both of these were taken from [@urob's fantastic layout](https://github.com/urob/zmk-config).
109119
110120
#### Smart Shift
@@ -146,7 +156,8 @@ On `L2` the same thumb keys you use to summon it will act as follows:
146156

147157
### Non-Stacking Upper Layers
148158

149-
> [!NOTE]\
159+
> [!NOTE]
160+
>
150161
> If this all sounds like gibberish to you here's all you need to understand: `L1` should always be the layer behind `L2` or `Fn`. If that's not the case, please [report it as a bug](https://github.com/minusfive/zmk-config/issues).
151162
152163
One of [ZMK's great features is its stacking layers model](https://zmk.dev/docs/features/keymaps#layers).
@@ -175,15 +186,6 @@ Without this behavior it might've been confusing if you pressed the `Fn` key whi
175186

176187
## Using layouts other than Colemak-DH
177188

178-
> [!NOTE]\
179-
> Other layouts available:
180-
>
181-
> - [Colemak](./knucklehead/L1_colemak.dtsi) (classic)
182-
> - [Dvorak](./knucklehead/L1_dvorak.dtsi)
183-
> - [QWERTY](./knucklehead/L1_qwerty.dtsi)
184-
>
185-
> Feel free to submit [PRs](https://github.com/minusfive/zmk-config/pulls) with additional layouts, or [open an issue](https://github.com/minusfive/zmk-config/issues) if you need help with a specific layout. Of course, you're also always welcome to fork this repo and create your own custom layouts.
186-
187189
In order to use layouts other than the default [Colemak-DH](https://colemakmods.github.io/mod-dh/) layout, you'll need to comment-out the `#include "L1_colemak-dh.dtsi"` statement in [./knucklehead/base.dtsi](./knucklehead/base.dtsi), and uncomment the corresponding layout file you wish to use. E.g.:
188190

189191
```diff
@@ -197,6 +199,16 @@ In order to use layouts other than the default [Colemak-DH](https://colemakmods.
197199
+#include "L1_qwerty.dtsi"
198200
```
199201

202+
Feel free to submit [PRs](https://github.com/minusfive/zmk-config/pulls) with additional layouts.
203+
204+
## Drawing the Keymap
205+
206+
This project uses [@caksoylar's Keymap Drawer](https://github.com/caksoylar/keymap-drawer) to generate the [keymap SVG](./img/corneish_zen.svg) displayed at the top of this document. It can be re-generated by running the [Draw keymap](./.github/workflows/draw.yml), or locally through the Zsh script:
207+
208+
```zsh
209+
./scripts/draw.zsh
210+
```
211+
200212
---
201213

202214
## Resources
@@ -207,10 +219,14 @@ In order to use layouts other than the default [Colemak-DH](https://colemakmods.
207219
- [@caksoylar's Keymap Drawer](https://github.com/caksoylar/keymap-drawer), [ZMK config](https://github.com/caksoylar/zmk-config) and [Display improvements for Corne-ish Zen](https://gist.github.com/caksoylar/c411313990978e1903c244f03039187a)
208220
- [@urob's ZMK config](https://github.com/urob/zmk-config)
209221
- [Colemak-DH](https://colemakmods.github.io/mod-dh/) and the [Effort Grid](https://colemakmods.github.io/mod-dh/model.html)
210-
- [Darryl's amazing Corne-ish Zen](https://lowprokb.ca/collections/keyboards/products/corne-ish-zen)
222+
- [Darryl's beautiful Corne-ish Zen](https://lowprokb.ca/collections/keyboards/products/corne-ish-zen)
211223

212224
---
213225

214226
[^1]: Name inspired by the [Knuckle mnemonic](https://en.wikipedia.org/wiki/Knuckle_mnemonic).
215227

216228
[^2]: "Designed" is perhaps too strong a word. "Haphazardly and painfully iterated over dozens of permutations, gradually removing annoyances and disruptions to my flow" is too long, though.
229+
230+
```
231+
232+
```

img/corneish_zen.png

-816 KB
Binary file not shown.

img/corneish_zen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
layout: {qmk_keyboard: corne_rotated, qmk_layout: LAYOUT_split_3x6_3}
1+
layout: {zmk_keyboard: corneish_zen, layout_name: default_transform}
22
layers:
33
L1:
44
- $$mdi:keyboard-esc$$

img/dvorak.svg

Lines changed: 0 additions & 1287 deletions
This file was deleted.

img/dvorak.yaml

Lines changed: 0 additions & 209 deletions
This file was deleted.

scripts/draw.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/draw.zsh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env zsh
2+
3+
set -euo pipefail
4+
5+
function {
6+
local __keymap="${1:-corneish_zen}"
7+
8+
local __repo_dir="$(dirname $(dirname $(realpath $ZSH_ARGZERO)))"
9+
local __keymap_input_file="$__repo_dir/config/${__keymap}.keymap"
10+
local __keymap_svg="$__repo_dir/img/${__keymap}.svg"
11+
local __keymap_yaml="$__repo_dir/img/${__keymap}.yaml"
12+
local __draw_config="$__repo_dir/keymap-drawer/config.yaml"
13+
14+
keymap -c $__draw_config parse -z $__keymap_input_file -o $__keymap_yaml
15+
keymap -c $__draw_config draw $__keymap_yaml -o $__keymap_svg
16+
} $@
17+

0 commit comments

Comments
 (0)