Skip to content

Commit

Permalink
meta: add files
Browse files Browse the repository at this point in the history
  • Loading branch information
markjoshwel committed Sep 20, 2023
0 parents commit a8672e3
Show file tree
Hide file tree
Showing 15 changed files with 1,510 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
workflow_dispatch:
push:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: main

- name: install devbox
uses: jetpack-io/[email protected]

- name: build project
id: build
run: |
devbox run make
cp *.hex fluffy58.hex
- name: release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: fluffy58.hex

- uses: actions/upload-artifact@v3
with:
name: fluffy58 firmware for lily58
path: fluffy58.hex
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# devbox
.devbox

# qmk
obj_*
*.hex
*.elf
*.map
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "qmk_firmware"]
path = qmk_firmware
url = https://github.com/qmk/qmk_firmware.git
674 changes: 674 additions & 0 deletions LICENCE

Large diffs are not rendered by default.

339 changes: 339 additions & 0 deletions LICENCE.GPL2

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# adapted from https://medium.com/@patrick.elmquist/separate-keymap-repo-for-qmk-136ff5a419bd

BUILD_DIR ?= $(shell pwd)
JOBS ?= 1

TARGET = lily58
USER = fluffy58

.PHONY: build
build:
# init and update submodules
git submodule update --init --recursive

# remove old symlink
rm -rf qmk_firmware/keyboards/$(TARGET)/keymaps/$(USER)

# add new symlink
mkdir -p qmk_firmware/keyboards/$(TARGET)/keymaps/
ln -s $(shell pwd)/$(TARGET)/ qmk_firmware/keyboards/$(TARGET)/keymaps/$(USER)

# lint
# cd qmk_firmware; qmk lint -km $(USER) -kb $(TARGET)

# build
make BUILD_DIR=$(BUILD_DIR) -j1 -C qmk_firmware $(TARGET):$(USER)

# cleanup
rm -rf qmk_firmware/keyboards/$(TARGET)/keymaps/$(USER)
rm -rf $(BUILD_DIR)/obj_*

clean:
rm -rf obj_*
rm -f *.elf
rm -f *.map
rm -f *.hex
109 changes: 109 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# fluffy58

an approachable 60%-like QMK keymap for the [Lily58 Pro RE](https://github.com/kissetfall/Lily58-Pro-RE)

- [layout](#layout)
- [make it yours](#make-it-yours)
- [building](#building)
- [flashing](#flashing)

## layout

- encoder controls:

- **left encoder**
- clockwise rotation: mouse down
- counter-clockwise rotation: mouse up
- press (default layer): `[`
- press (lower layer): reset

- **right encoder**
- clockwise rotation: volume down
- counter-clockwise rotation: volume up
- press (default layer): `]`
- press (lower layer): reset

- default qwerty layer:

```text
,-----------------------------------------. ,-----------------------------------------.
| ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|LShift| A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
|------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
|LCTRL | Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
`-----------------------------------------/ / \ \-----------------------------------------'
|LOWER | LGUI | LAlt | /Space / \Space \ |Enter | RAlt |LOWER |
| | | |/ / \ \ | | | |
`----------------------------' '------''--------------------'
```

- lower layer:

```text
,-----------------------------------------. ,-----------------------------------------.
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | DEL |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| F12 | M1 | MUp | M2 | | | | | Up | | 7 | 8 | 9 |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|CapsLk|MLeft |Mdown |MRight| | |-------. ,-------| Left | Down |Right | 4 | 5 | 6 |
|------+------+------+------+------+------| Reset | | Reset |------+------+------+------+------+------|
|LCTRL |MAccl0|MAccl1|MAccl3| | |-------| |-------| | | | 1 | 2 | 3 |
`-----------------------------------------/ / \ \-----------------------------------------'
| | APP | LAlt | / / \ \ | | RAlt | 0 |
| | | |/ / \ \ | | | |
`----------------------------' '------''--------------------'
```

## make it yours

this keymap is very bare bones, because that's all I need. there's no userspace here.

want underglow? rgb? look around for a config you like and add their respective sections
to `config.h`, `keymap.c` and `rules.mk`.

## building

you will need and [qmk-cli](https://docs.qmk.fm/#/newbs_getting_started?id=set-up-your-environment).

```shell
make
```

nix/devbox users can use devbox to build the keymap:

```shell
devbox run make
```

## flashing

> [!WARNING]
> while one of the sides is powered, at any point do not plug in or out the TRRS cable!
> doing so might cause an irreversible electric fault.
either [build](#building) a .hex file yourself or grab one from the
[releases page](https://github.com/markjoshwel/fluffy58/releases).

flash one side at a time, seperately and NOT connected to each other.

this guide shows how to flash with [QMK Toolbox](https://github.com/qmk/qmk_toolbox).
for more information on flashing in general and a howto for the command line:
see <https://docs.qmk.fm/#/newbs_flashing>.

1. open QMK Toolbox, select the .hex file you want to flash and enable auto-flash.

![QMK Toolbox](./imgs/toolbox-0.png)

2. on your Lily58, short the RESET holes on the lily58 pcb.
you can use a pair of tweezers or a paperclip for this.

however, if the RESET holes are not accessible, you can directly short the RESET and
GND pins on your controller. see your controller's pinouts for this.

your controller should now enter DFU mode, shortly after which QMK Toolbox will
recognise your controller and flash the hex file.

3. et voilà! you're done. repeat for the other side.
13 changes: 13 additions & 0 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"packages": [
"qmk@latest"
],
"shell": {
"init_hook": [],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
11 changes: 11 additions & 0 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"lockfile_version": "1",
"packages": {
"qmk@latest": {
"last_modified": "2023-09-17T10:54:49Z",
"resolved": "github:NixOS/nixpkgs/5148520bfab61f99fd25fb9ff7bfbb50dad3c9db#qmk",
"source": "devbox-search",
"version": "1.1.2"
}
}
}
131 changes: 131 additions & 0 deletions fluffy58.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "lily58/rev1",
"keymap": "fluffy58",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
"KC_1",
"KC_2",
"KC_3",
"KC_4",
"KC_5",
"KC_6",
"KC_7",
"KC_8",
"KC_9",
"KC_0",
"KC_BSPC",
"KC_TAB",
"KC_Q",
"KC_W",
"KC_E",
"KC_R",
"KC_T",
"KC_Y",
"KC_U",
"KC_I",
"KC_O",
"KC_P",
"KC_GRV",
"KC_LSFT",
"KC_A",
"KC_S",
"KC_D",
"KC_F",
"KC_G",
"KC_H",
"KC_J",
"KC_K",
"KC_L",
"KC_SCLN",
"KC_MINS",
"KC_LCTL",
"KC_Z",
"KC_X",
"KC_C",
"KC_V",
"KC_B",
"KC_LBRC",
"KC_RBRC",
"KC_N",
"KC_M",
"KC_COMM",
"KC_DOT",
"KC_SLSH",
"KC_QUOT",
"MO(1)",
"KC_LGUI",
"KC_LALT",
"KC_SPC",
"KC_SPC",
"KC_ENT",
"KC_RALT",
"MO(1)"
],
[
"KC_F1",
"KC_F2",
"KC_F3",
"KC_F4",
"KC_F5",
"KC_F6",
"KC_F7",
"KC_F8",
"KC_F9",
"KC_F10",
"KC_F11",
"KC_DEL",
"KC_F12",
"KC_BTN1",
"KC_MS_U",
"KC_BTN2",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_UP",
"KC_NO",
"KC_P7",
"KC_P8",
"KC_P9",
"KC_CAPS",
"KC_MS_L",
"KC_MS_D",
"KC_MS_R",
"KC_NO",
"KC_NO",
"KC_LEFT",
"KC_DOWN",
"KC_RGHT",
"KC_P4",
"KC_P5",
"KC_P6",
"KC_LCTL",
"KC_ACL0",
"KC_ACL1",
"KC_ACL2",
"KC_NO",
"KC_NO",
"QK_BOOT",
"QK_BOOT",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_P1",
"KC_P2",
"KC_P3",
"KC_NO",
"KC_APP",
"KC_LALT",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_RALT",
"KC_P0"
]
],
"author": "Mark Joshwel <[email protected]>"
}
Binary file added imgs/toolbox-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions lily58/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
modified from `qmk new-keymap` and https://github.com/ergohaven/qmk_firmware/blob/master/keyboards/lily58/keymaps/eh/config.h
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

/* Select hand configuration */

//#define MASTER_LEFT
//#define MASTER_RIGHT
#define EE_HANDS

#define USE_SERIAL_PD2

#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 100

/* Encoder support */
#define ENCODERS_PAD_A { F5 }
#define ENCODERS_PAD_B { F4 }
#define ENCODER_RESOLUTION 2
#define ENCODERS_PAD_A_RIGHT { F4 }
#define ENCODERS_PAD_B_RIGHT { F5 }
#define ENCODER_DIRECTION_RIGHT 4
#define ENCODER_DIRECTION_FLIP
Loading

0 comments on commit a8672e3

Please sign in to comment.