Skip to content

Commit

Permalink
refactor: add new clean user folder and wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed May 30, 2023
1 parent b7c6648 commit 5d5e352
Show file tree
Hide file tree
Showing 16 changed files with 557 additions and 268 deletions.
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2

# We recommend you to keep these unchanged
charset = utf-8
Expand All @@ -28,7 +28,3 @@ indent_style = tab

[*.sh]
end_of_line = lf

[*.{nix,yml}]
indent_size = 2

2 changes: 1 addition & 1 deletion firmware
Submodule firmware updated 1261 files
5 changes: 3 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ dm5:
crkbd:
@just _build crkbd:edeneast crkbd_rev1_edeneast.hex crkbd

_build make_cmd source target: init
# _build make_cmd source target: init
_build make_cmd source target:
#!/usr/bin/env bash
printf "{{yellow}}--------------------------------------------------------------------------------------{{reset}}\n"
printf "Buildling: {{blue}}{{source}}{{reset}}\n\n"
Expand Down Expand Up @@ -126,7 +127,7 @@ reinit:
# Format c files
fmt:
clang-format -i $(fd --exclude external --extension c --extension h .)
clang-format --style=llvm -i $(fd --exclude ./firmware --extension c --extension h .)

# Generate layout map
layout:
Expand Down
14 changes: 7 additions & 7 deletions keyboard/crkbd/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USE_SERIAL_PD2

#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 27
# define RGBLIGHT_LIMIT_VAL 120
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#endif

#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
94 changes: 48 additions & 46 deletions keyboard/crkbd/keymap.c
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
#include "edeneast.h"
#include QMK_KEYBOARD_H

#define LAYOUT_split_3x6_3_WRAPPER(...) LAYOUT_split_3x6_3(__VA_ARGS__)

// clang-format off
// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// [_COLEMAK_DH] = LAYOUT_split_3x6_3_WRAPPER (
// _________________COLEMAK_DH_L1_________________, _________________COLEMAK_DH_R1_________________,
// _________________COLEMAK_DH_L2_________________, _________________COLEMAK_DH_R2_________________,
// _________________COLEMAK_DH_L3_________________, _________________COLEMAK_DH_R3_________________,
// TB_DFL3,TB_DFL2,TB_DFL1, TB_DFR1,TB_DFR2,TB_DFR3
// ),
//
// [_SYM] = LAYOUT_split_3x6_3_WRAPPER (
// ____________________SYMB_L1____________________, ____________________SYMB_R1____________________,
// ____________________SYMB_L2____________________, ____________________SYMB_R2____________________,
// ____________________SYMB_L3____________________, ____________________SYMB_R3____________________,
// TB_SYL3,TB_SYL2,TB_SYL1, TB_SYR1,TB_SYR2,TB_SYR3
// ),
//
// [_NAV] = LAYOUT_split_3x6_3_WRAPPER (
// ____________________NAVI_L1____________________, ____________________NAVI_R1____________________,
// ____________________NAVI_L2____________________, ____________________NAVI_R2____________________,
// ____________________NAVI_L3____________________, ____________________NAVI_R3____________________,
// TB_NVL3,TB_NVL2,TB_NVL1, TB_NVR1,TB_NVR2,TB_NVR3
// ),
//
// [_ADJ] = LAYOUT_split_3x6_3_WRAPPER (
// _____________________ADJ_L1____________________, _____________________ADJ_R1____________________,
// _____________________ADJ_L2____________________, _____________________ADJ_R2____________________,
// _____________________ADJ_L3____________________, _____________________ADJ_R3____________________,
// TB_AJL3,TB_AJL2,TB_AJL1, TB_AJR1,TB_AJR2,TB_AJR3
// ),
//
// [_STENO] = LAYOUT_split_3x6_3_WRAPPER (
// ____________________STENO_L1___________________, ____________________STENO_R1___________________,
// ____________________STENO_L2___________________, ____________________STENO_R2___________________,
// ____________________STENO_L3___________________, ____________________STENO_R3___________________,
// TB_STL3,TB_STL2,TB_STL1, TB_STR1,TB_STR2,TB_STR3
// ),
//
// [_GAME] = LAYOUT_split_3x6_3_WRAPPER (
// ____________________GAME_L1____________________, ____________________GAME_R1____________________,
// ____________________GAME_L2____________________, ____________________GAME_R2____________________,
// ____________________GAME_L3____________________, ____________________GAME_R3____________________,
// TB_GML3,TB_GML2,TB_GML1, TB_GMR1,TB_GMR2,TB_GMR3
// ),
// };
//
#define LAYOUT_WRAPPER(...) LAYOUT_split_3x6_3(__VA_ARGS__)
#define LAYOUT_base( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C \
) \
LAYOUT_WRAPPER ( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
_______, SYM_TAB, SFT_BSP, SFT_SPC, NAV_MIN, _______, \
)

#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_COLEMAK_DH] = LAYOUT_base_wrapper(
___________________COLEMAK_DH_L1____________________, ___________________COLEMAK_DH_R1____________________,
___________________COLEMAK_DH_L2____________________, ___________________COLEMAK_DH_R2____________________,
___________________COLEMAK_DH_L3____________________, ___________________COLEMAK_DH_R3____________________
),

[_SYM] = LAYOUT_base_wrapper(
_______________________SYM_L1_______________________, _______________________SYM_R1_______________________,
_______________________SYM_L2_______________________, _______________________SYM_R2_______________________,
_______________________SYM_L3_______________________, _______________________SYM_R3_______________________
),

[_NAV] = LAYOUT_base_wrapper(
_______________________NAV_L1_______________________, _______________________NAV_R1_______________________,
_______________________NAV_L2_______________________, _______________________NAV_R2_______________________,
_______________________NAV_L3_______________________, _______________________NAV_R3_______________________
),

[_ADJ] = LAYOUT_base_wrapper(
_______________________ADJ_L1_______________________, _______________________ADJ_R1_______________________,
_______________________ADJ_L2_______________________, _______________________ADJ_R2_______________________,
_______________________ADJ_L3_______________________, _______________________ADJ_R3_______________________
)

};

// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______

// clang-format on
4 changes: 2 additions & 2 deletions keyboard/crkbd/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
# OLED_ENABLE = yes
# OLED_DRIVER = SSD1306
150 changes: 52 additions & 98 deletions keyboard/dm/4x6/keymap.c
Original file line number Diff line number Diff line change
@@ -1,102 +1,56 @@
#include "edeneast.h"
#include QMK_KEYBOARD_H

// clang-format off
#define LAYOUT_WRAPPER(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_base( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C \
) \
LAYOUT_WRAPPER ( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, \
SYM_TAB, SFT_BSP, SFT_SPC, NAV_MIN, \
_______,_______, _______,_______, _______,_______, _______,_______ \
)

// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//
// // clang-format off
// // Base (Colemak-DH) https://colemakmods.github.io/mod-dh/keyboards.html#matrix-keyboards
// [_COLEMAK_DH] = LAYOUT_WRAPPER(
// _________________COLEMAK_DH_L1_________________, _________________COLEMAK_DH_R1_________________,
// _________________COLEMAK_DH_L2_________________, _________________COLEMAK_DH_R2_________________,
// _________________COLEMAK_DH_L3_________________, _________________COLEMAK_DH_R3_________________,
// KC_LEFT,KC_RGHT, KC_UP ,KC_DOWN,
// TB_DFL2,TB_DFL1, TB_DFR1,TB_DFR2,
// KC_ENT ,TB_DFL3, TB_DFR3,_______,
// _______,_______, _______,_______
// ),
//
// [_SYM] = LAYOUT_WRAPPER(
// ____________________SYMB_L1____________________, ____________________SYMB_R1____________________,
// ____________________SYMB_L2____________________, ____________________SYMB_R2____________________,
// ____________________SYMB_L3____________________, ____________________SYMB_R3____________________,
// _______,_______, _______,_______,
// TB_SYL2,TB_SYL1, TB_SYR1,TB_SYR2,
// _______,TB_SYL3, TB_SYR3,_______,
// _______,_______, _______,_______
// ),
//
// [_NAV] = LAYOUT_WRAPPER(
// ____________________NAVI_L1____________________, ____________________NAVI_R1____________________,
// ____________________NAVI_L2____________________, ____________________NAVI_R2____________________,
// ____________________NAVI_L3____________________, ____________________NAVI_R3____________________,
// _______,_______, _______,_______,
// TB_NVL2,TB_NVL1, TB_NVR1,TB_NVR2,
// _______,TB_NVL3, TB_NVR3,_______,
// _______,_______, _______,_______
// ),
//
// [_ADJ] = LAYOUT_WRAPPER(
// _____________________ADJ_L1____________________, _____________________ADJ_R1____________________,
// _____________________ADJ_L2____________________, _____________________ADJ_R2____________________,
// _____________________ADJ_L3____________________, _____________________ADJ_R3____________________,
// _______,_______, _______,_______,
// TB_AJL2,TB_AJL1, TB_AJR1,TB_AJR2,
// _______,TB_AJL3, TB_AJR3,_______,
// _______,_______, _______,_______
// ),
//
// [_STENO] = LAYOUT_WRAPPER(
// ____________________STENO_L1___________________, ____________________STENO_R1___________________,
// ____________________STENO_L2___________________, ____________________STENO_R2___________________,
// ____________________STENO_L3___________________, ____________________STENO_R3___________________,
// _______,_______, _______,_______,
// TB_STL2,TB_STL1, TB_STR1,TB_STR2,
// _______,TB_STL3, TB_STR3,_______,
// _______,_______, _______,_______
// ),
//
// [_GAME] = LAYOUT_WRAPPER(
// ____________________GAME_L1____________________, ____________________GAME_R1____________________,
// ____________________GAME_L2____________________, ____________________GAME_R2____________________,
// ____________________GAME_L3____________________, ____________________GAME_R3____________________,
// KC_T ,KC_G , _______,_______,
// TB_GML2,TB_GML1, TB_GMR1,TB_GMR2,
// TG_MIC ,TB_GML3, TB_GMR3,OS_RSFT,
// KC_PAUS,KC_F2 , _______,_______
// ),
// };
//
// // ---------------------------------------------------------------------------------------------------------------------------
//
// /**
// * Layer
// * |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
// * | | | | | | | | | | | | | |
// * |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
// * | | | | | | | | | | | | | |
// * |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
// * | | | | | | | | | | | | | |
// * +---------------+-------+-------+---------------+ +---------------+-------+-------+---------------+
// * | | | | | |
// * +---------------+---------------+ +---------------+---------------+
// * | | | | | |
// * +---------------+ +---------------+
// * +---------------+ +---------------+
// * | | | | | |
// * |-------+-------| |-------+-------|
// * | | | | | |
// * +---------------+ +---------------+
// */
// /*
// [_layer] = LAYOUT_WRAPPER(
// _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
// _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
// _______,_______, _______,_______,
// _______,_______, _______,_______,
// _______,_______, _______,_______,
// _______,_______, _______,_______
// ),
// */
#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_COLEMAK_DH] = LAYOUT_base_wrapper(
___________________COLEMAK_DH_L1____________________, ___________________COLEMAK_DH_R1____________________,
___________________COLEMAK_DH_L2____________________, ___________________COLEMAK_DH_R2____________________,
___________________COLEMAK_DH_L3____________________, ___________________COLEMAK_DH_R3____________________
),

[_SYM] = LAYOUT_base_wrapper(
_______________________SYM_L1_______________________, _______________________SYM_R1_______________________,
_______________________SYM_L2_______________________, _______________________SYM_R2_______________________,
_______________________SYM_L3_______________________, _______________________SYM_R3_______________________
),

[_NAV] = LAYOUT_base_wrapper(
_______________________NAV_L1_______________________, _______________________NAV_R1_______________________,
_______________________NAV_L2_______________________, _______________________NAV_R2_______________________,
_______________________NAV_L3_______________________, _______________________NAV_R3_______________________
),

[_ADJ] = LAYOUT_base_wrapper(
_______________________ADJ_L1_______________________, _______________________ADJ_R1_______________________,
_______________________ADJ_L2_______________________, _______________________ADJ_R2_______________________,
_______________________ADJ_L3_______________________, _______________________ADJ_R3_______________________
)

};

// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______,
// _______, _______, _______, _______,
// _______, _______, _______, _______,
// _______, _______, _______, _______

// clang-format on
Loading

0 comments on commit 5d5e352

Please sign in to comment.