Add initial user config

This commit is contained in:
Manna Harbour 2020-10-26 15:55:22 +11:00
commit 13a83ffc3c
4 changed files with 152 additions and 0 deletions

78
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,78 @@
on: [push, pull_request, workflow_dispatch]
name: Build
jobs:
build:
runs-on: ubuntu-latest
name: Build Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: West Init
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-init
with:
args: 'init "-l config"'
- name: West Update
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-update
with:
args: 'update'
- name: West Config Zephyr Base
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-config
with:
args: 'config "--global zephyr.base-prefer configfile"'
- name: West Zephyr Export
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-zephyr-export
with:
args: 'zephyr-export'
- name: West Build (Corne Left)
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-build-corne-left
with:
args: 'build "-s zmk/app -b nice_nano -- -DSHIELD=corne_left -DZMK_CONFIG=/github/workspace/config"'
- name: Corne DTS File
if: ${{ always() }}
run: cat -n build/zephyr/nice_nano.dts.pre.tmp
- name: Corne Left Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 corne_left_nice_nano.uf2
- name: Archive (Corne Left)
uses: actions/upload-artifact@v2
with:
name: firmware
path: corne_left_nice_nano.uf2
- name: West Build (Corne Right)
uses: 'docker://zmkfirmware/zephyr-west-action-arm:latest'
id: west-build-corne-right
with:
args: 'build "--pristine -s zmk/app -b nice_nano -- -DSHIELD=corne_right -DZMK_CONFIG=/github/workspace/config"'
- name: Corne Right Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 corne_right_nice_nano.uf2
- name: Archive (Corne Right)
uses: actions/upload-artifact@v2
with:
name: firmware
path: corne_right_nice_nano.uf2

6
config/corne.conf Normal file
View File

@ -0,0 +1,6 @@
# Uncomment the following lines to enable the Corne RGB Underglow
# ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# Uncomment the following line to enable the Corne OLED Display
# CONFIG_ZMK_DISPLAY=y

57
config/corne.keymap Normal file
View File

@ -0,0 +1,57 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP
&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT
&kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
// -----------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp ESC &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp BKSP
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LARW &kp DARW &kp UARW &kp RARW &trans &trans
&kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPC &kp RET &trans &kp RALT
>;
};
raise_layer {
// -----------------------------------------------------------------------------------------
// | ESC | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | { | } | "|" | ` |
// | SHFT | | | | | | | _ | + | [ | ] | \ | ~ | // TODO: Fix this row when &mkp is committed
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp ESC &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp BKSP
&kp LCTL &trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp PIPE &kp GRAV
&kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH &kp TILD
&kp LGUI &trans &kp SPC &kp RET &trans &kp RALT
>;
};
};
};

11
config/west.yml Normal file
View File

@ -0,0 +1,11 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config