diff --git a/.github/workflows/draw.yaml b/.github/workflows/draw.yaml new file mode 100644 index 0000000..1524752 --- /dev/null +++ b/.github/workflows/draw.yaml @@ -0,0 +1,22 @@ +# Example for using the keymap-drawer ZMK user config workflow +name: Draw ZMK keymaps +on: + workflow_dispatch: # can be triggered manually + push: # automatically run on changes to following paths + paths: + - "config/*.keymap" + - "config/*.dtsi" + - "keymap-drawer/config.yaml" + # - 'boards/*/*/*.keymap' + +jobs: + draw: + uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main + permissions: + contents: write # allow workflow to commit to the repo + with: + keymap_patterns: "config/*.keymap" # path to the keymaps to parse + config_path: "keymap-drawer/config.yaml" # config file, ignored if not exists + output_folder: "keymap-drawer" # path to save produced SVG and keymap YAML files + parse_args: "" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''" + draw_args: "" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" diff --git a/keymap-drawer/config.yaml b/keymap-drawer/config.yaml new file mode 100644 index 0000000..315ec65 --- /dev/null +++ b/keymap-drawer/config.yaml @@ -0,0 +1,198 @@ +draw_config: + key_w: 60.0 + key_h: 56.0 + split_gap: 30.0 + combo_w: 28.0 + combo_h: 26.0 + key_rx: 6.0 + key_ry: 6.0 + dark_mode: false + n_columns: 1 + separate_combo_diagrams: false + combo_diagrams_scale: 2 + inner_pad_w: 2.0 + inner_pad_h: 2.0 + outer_pad_w: 30.0 + outer_pad_h: 56.0 + line_spacing: 1.2 + arc_radius: 6.0 + append_colon_to_layer_header: true + small_pad: 2.0 + legend_rel_x: 0.0 + legend_rel_y: 0.0 + draw_key_sides: false + key_side_pars: + rel_x: 0 + rel_y: 4 + rel_w: 12 + rel_h: 12 + rx: 4 + ry: 4 + svg_extra_style: '' + footer_text: '' + shrink_wide_legends: 7 + glyph_tap_size: 14 + glyph_hold_size: 12 + glyph_shifted_size: 10 + glyphs: {} +parse_config: + preprocess: true + skip_binding_parsing: false + raw_binding_map: {} + sticky_label: sticky + toggle_label: toggle + tap_toggle_label: tap-toggle + trans_legend: + t: ▽ + type: trans + mark_alternate_layer_activators: false + modifier_fn_map: + left_ctrl: Ctl + right_ctrl: Ctl + left_shift: Sft + right_shift: Sft + left_alt: Alt + right_alt: AGr + left_gui: Gui + right_gui: Gui + keycode_combiner: '{mods}+ {key}' + mod_combiner: '{mod_1}+{mod_2}' + special_combinations: + left_ctrl+left_alt+left_gui+left_shift: Hyper + left_ctrl+left_alt+left_shift: Meh + qmk_remove_keycode_prefix: + - KC_ + qmk_keycode_map: + XXXXXXX: '' + 'NO': '' + MINUS: '-' + MINS: '-' + EQUAL: '=' + EQL: '=' + LEFT_BRACKET: '[' + LBRC: '[' + RIGHT_BRACKET: ']' + RBRC: ']' + BACKSLASH: \ + BSLS: \ + NONUS_HASH: '#' + NUHS: '#' + SEMICOLON: ; + SCLN: ; + QUOTE: '''' + QUOT: '''' + GRAVE: '`' + GRV: '`' + COMMA: ',' + COMM: ',' + DOT: . + SLASH: / + SLSH: / + TILDE: '~' + TILD: '~' + EXCLAIM: '!' + EXLM: '!' + AT: '@' + HASH: '#' + DOLLAR: $ + DLR: $ + PERCENT: '%' + PERC: '%' + CIRCUMFLEX: ^ + CIRC: ^ + AMPERSAND: '&' + AMPR: '&' + ASTERISK: '*' + ASTR: '*' + LEFT_PAREN: ( + LPRN: ( + RIGHT_PAREN: ) + RPRN: ) + UNDERSCORE: _ + UNDS: _ + PLUS: + + LEFT_CURLY_BRACE: '{' + LCBR: '{' + RIGHT_CURLY_BRACE: '}' + RCBR: '}' + PIPE: '|' + COLON: ':' + COLN: ':' + DOUBLE_QUOTE: '"' + DQUO: '"' + DQT: '"' + LEFT_ANGLE_BRACKET: < + LABK: < + LT: < + RIGHT_ANGLE_BRACKET: '>' + RABK: '>' + GT: '>' + QUESTION: '?' + QUES: '?' + zmk_remove_keycode_prefix: [] + zmk_keycode_map: + EXCLAMATION: '!' + EXCL: '!' + AT_SIGN: '@' + AT: '@' + HASH: '#' + POUND: '#' + DOLLAR: $ + DLLR: $ + PERCENT: '%' + PRCNT: '%' + CARET: ^ + AMPERSAND: '&' + AMPS: '&' + ASTERISK: '*' + ASTRK: '*' + STAR: '*' + LEFT_PARENTHESIS: ( + LPAR: ( + RIGHT_PARENTHESIS: ) + RPAR: ) + EQUAL: '=' + PLUS: + + MINUS: '-' + UNDERSCORE: _ + UNDER: _ + SLASH: / + FSLH: / + QUESTION: '?' + QMARK: '?' + BACKSLASH: \ + BSLH: \ + PIPE: '|' + NON_US_BACKSLASH: \ + PIPE2: '|' + NON_US_BSLH: '|' + SEMICOLON: ; + SEMI: ; + COLON: ':' + SINGLE_QUOTE: '''' + SQT: '''' + APOSTROPHE: '''' + APOS: '''' + DOUBLE_QUOTES: '"' + DQT: '"' + COMMA: ',' + LESS_THAN: < + LT: < + PERIOD: . + DOT: . + GREATER_THAN: '>' + GT: '>' + LEFT_BRACKET: '[' + LBKT: '[' + LEFT_BRACE: '{' + LBRC: '{' + RIGHT_BRACKET: ']' + RBKT: ']' + RIGHT_BRACE: '}' + RBRC: '}' + GRAVE: '`' + TILDE: '~' + NON_US_HASH: '#' + NUHS: '#' + TILDE2: '~' + zmk_combos: {}