Skip to content

Commit

Permalink
Merge pull request #2 from lesshonor/refactor
Browse files Browse the repository at this point in the history
refactor: corne to eyelash_corne
  • Loading branch information
a741725193 authored Dec 3, 2024
2 parents 4dc56f9 + d95154c commit 1f77eff
Show file tree
Hide file tree
Showing 45 changed files with 847 additions and 3,617 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@ name: Build ZMK firmware
on:
workflow_dispatch:
push:
paths:
- "config/**"
paths-ignore:
- "keymap-drawer/**"

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
permissions:
contents: write
with:
commit_message: "[Draw] ${{ github.event.head_commit.message }}"
amend_commit: false
install_branch: "main"
keymap_patterns: "config/*.keymap"
json_path: "config"
config_path: "keymap_drawer.config.yaml" # config file, ignored if not exists
output_folder: "keymap-drawer"
destination: "both"
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'"

18 changes: 18 additions & 0 deletions .github/workflows/draw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Draw Keymap
on:
workflow_dispatch:
push:
paths:
- "config/**"
- .github/workflows/draw.yml
- keymap_drawer.config.yaml

jobs:
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
permissions:
contents: write
with:
commit_message: "[Draw] ${{ github.event.head_commit.message }}"
destination: "commit"
fail_on_error: ${{ fromJSON(true) }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
build/
zmk/
zephyr/
modules/
tools/
.west/
.west/
44 changes: 41 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
if you need the 3D modle of this keyboard,you can connect me by Email。[email protected]
# zmk-config-corne
# 睫毛外设 (Eyelash Peripherals) Corne ZMK Repository

**This keyboard is not the same as [foostan's Corne](https://github.com/foostan/crkbd). It will not work with standard `corne` firmware.**

<img src="keymap-drawer/corne.svg" >
![Photo of Eyelash Peripherals Corne](https://ae01.alicdn.com/kf/Sa797fee25edd44248fbfdb0e13d44e00B.jpg)

If you need a 3D model of this keyboard, email `[email protected]`.

## Instructions

1. [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository).
2. [Click the **Actions** tab and make sure the workflow is enabled](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow#enabling-a-workflow).
3. Make sure the `eyelash_corne` project in [`config/west.yml`](config/west.yml) still works. The `boards/arm/eyelash_corne` folder will be downloaded from this URL.
4. If there is still a `boards/arm/eyelash_corne` folder in your fork, delete it.

**If you already have a ZMK config repository, [you can add this one as a module instead of forking](https://zmk.dev/docs/features/modules#building-with-modules).**

## Keymap Diagram

![Diagram of config/eyelash_corne.keymap](keymap-drawer/eyelash_corne.svg "generated by @caksoylar's Keymap Drawer")

## Mouse Support

:warning: This repository defaults to an EXPERIMENTAL mouse movement branch which is slated for eventual merge into ZMK, but is not guaranteed to be stable. For more information, see [beta testing](https://zmk.dev/docs/features/modules#beta-testing) and [PR #2477](https://github.com/zmkfirmware/zmk/pull/2477).

If desired, edit your `config/west.yml` to switch back to `zmkfirmware`'s `main` branch:

```diff
diff --git a/config/west.yml b/config/west.yml
index ac30a68..70ad540 100644
--- a/config/west.yml
+++ b/config/west.yml
@@ -13,8 +13,8 @@ manifest:
url: https://github.com/a741725193/zmk-new_corne
revision: main
- name: zmk
- remote: petejohanson
- revision: feat/pointers-with-input-processors
+ remote: zmkfirmware
+ revision: main
import: app/west.yml
self:
path: config
```
12 changes: 12 additions & 0 deletions boards/arm/eyelash_corne/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

config BOARD_EYELASH_CORNE_LEFT
bool "eyelash_corne left"
depends on SOC_NRF52840_QIAA

config BOARD_EYELASH_CORNE_RIGHT
bool "eyelash_corne right"
depends on SOC_NRF52840_QIAA
61 changes: 61 additions & 0 deletions boards/arm/eyelash_corne/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

if BOARD_EYELASH_CORNE_LEFT

config ZMK_KEYBOARD_NAME
default "Eyelash Corne"

config ZMK_SPLIT_ROLE_CENTRAL
default y

endif # BOARD_EYELASH_CORNE_LEFT

if BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT

config BOARD
default "eyelash_corne"

config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y

config BOARD_ENABLE_DCDC_HV
bool "Enable High Voltage DCDC converter"
default y
select SOC_DCDC_NRF52X_HV
depends on (BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT)

config ZMK_SLEEP
default y

config ZMK_SPLIT
default y

config BT_CTLR
default BT

if USB

config USB_NRFX
default y

config USB_DEVICE_STACK
default y

endif # USB

if ZMK_BACKLIGHT

config PWM
default y

config LED_PWM
default y

endif # ZMK_BACKLIGHT

endif # BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2021 @MangoIV
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")

include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
68 changes: 68 additions & 0 deletions boards/arm/eyelash_corne/eyelash_corne-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
*
* Copyright (c) 2024 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/

#include <physical_layouts.dtsi>

/ {
default_layout: default_layout {
compatible = "zmk,physical-layout";
display-name = "Layout";

transform = <&default_transform>;

keys // w h x y rot rx r
= <&key_physical_attrs 100 100 0 37 0 0 0>
, <&key_physical_attrs 100 100 100 37 0 0 0>
, <&key_physical_attrs 100 100 200 12 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 12 0 0 0>
, <&key_physical_attrs 100 100 500 24 0 0 0>
, <&key_physical_attrs 100 100 925 24 0 0 0>
, <&key_physical_attrs 100 100 1150 24 0 0 0>
, <&key_physical_attrs 100 100 1250 12 0 0 0>
, <&key_physical_attrs 100 100 1350 0 0 0 0>
, <&key_physical_attrs 100 100 1450 12 0 0 0>
, <&key_physical_attrs 100 100 1550 37 0 0 0>
, <&key_physical_attrs 100 100 1650 37 0 0 0>
, <&key_physical_attrs 100 100 0 137 0 0 0>
, <&key_physical_attrs 100 100 100 137 0 0 0>
, <&key_physical_attrs 100 100 200 112 0 0 0>
, <&key_physical_attrs 100 100 300 100 0 0 0>
, <&key_physical_attrs 100 100 400 112 0 0 0>
, <&key_physical_attrs 100 100 500 124 0 0 0>
, <&key_physical_attrs 100 100 825 124 0 0 0>
, <&key_physical_attrs 100 100 925 124 0 0 0>
, <&key_physical_attrs 100 100 1025 124 0 0 0>
, <&key_physical_attrs 100 100 1150 124 0 0 0>
, <&key_physical_attrs 100 100 1250 112 0 0 0>
, <&key_physical_attrs 100 100 1350 100 0 0 0>
, <&key_physical_attrs 100 100 1450 112 0 0 0>
, <&key_physical_attrs 100 100 1550 137 0 0 0>
, <&key_physical_attrs 100 100 1650 137 0 0 0>
, <&key_physical_attrs 100 100 0 237 0 0 0>
, <&key_physical_attrs 100 100 100 237 0 0 0>
, <&key_physical_attrs 100 100 200 212 0 0 0>
, <&key_physical_attrs 100 100 300 200 0 0 0>
, <&key_physical_attrs 100 100 400 212 0 0 0>
, <&key_physical_attrs 100 100 500 224 0 0 0>
, <&key_physical_attrs 100 100 625 224 0 0 0>
, <&key_physical_attrs 100 100 925 224 0 0 0>
, <&key_physical_attrs 100 100 1150 224 0 0 0>
, <&key_physical_attrs 100 100 1250 212 0 0 0>
, <&key_physical_attrs 100 100 1350 200 0 0 0>
, <&key_physical_attrs 100 100 1450 212 0 0 0>
, <&key_physical_attrs 100 100 1550 237 0 0 0>
, <&key_physical_attrs 100 100 1650 237 0 0 0>
, <&key_physical_attrs 100 100 350 312 0 0 0>
, <&key_physical_attrs 100 100 450 312 1200 450 412>
, <&key_physical_attrs 100 100 550 312 2400 515 433>
, <&key_physical_attrs 100 100 1100 312 (-2400) 1230 433>
, <&key_physical_attrs 100 100 1200 312 (-1200) 1300 412>
, <&key_physical_attrs 100 100 1300 312 0 0 0>
;
};
};
Loading

0 comments on commit 1f77eff

Please sign in to comment.