From 7655280eced9f718133ac11b42f37dce34444031 Mon Sep 17 00:00:00 2001 From: jasmine Date: Sat, 21 Sep 2024 12:42:00 +0800 Subject: [PATCH] feat: enable rgb --- keyboards/crkbd/keymaps/sajenim/combos.def | 1 + keyboards/crkbd/keymaps/sajenim/config.h | 17 +++++++++++++++++ keyboards/crkbd/keymaps/sajenim/keymap.c | 14 ++++++++++++++ keyboards/crkbd/keymaps/sajenim/rules.mk | 1 + 4 files changed, 33 insertions(+) diff --git a/keyboards/crkbd/keymaps/sajenim/combos.def b/keyboards/crkbd/keymaps/sajenim/combos.def index aadbcf6..20acc34 100644 --- a/keyboards/crkbd/keymaps/sajenim/combos.def +++ b/keyboards/crkbd/keymaps/sajenim/combos.def @@ -4,6 +4,7 @@ COMB(NE_ESC, KC_ESC, RCTL_T(KC_N), RSFT_T(KC_E)) COMB(SE_CAP, CW_TOGG, LSFT_T(KC_S), RSFT_T(KC_E)) COMB(THUMB_SLEEP, KC_SLEP, LT(NAV, KC_SPC), KC_ENT) +COMB(ST_MOD, TG(MOD), LSFT_T(KC_S), LCTL_T(KC_T)) SUBS(YP_HOME, "~/", KC_Y, KC_P) SUBS(FO_UPDIR, "../", KC_F, KC_O) diff --git a/keyboards/crkbd/keymaps/sajenim/config.h b/keyboards/crkbd/keymaps/sajenim/config.h index eb86762..e5acd5b 100644 --- a/keyboards/crkbd/keymaps/sajenim/config.h +++ b/keyboards/crkbd/keymaps/sajenim/config.h @@ -22,3 +22,20 @@ // Oled font to use. #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#endif diff --git a/keyboards/crkbd/keymaps/sajenim/keymap.c b/keyboards/crkbd/keymaps/sajenim/keymap.c index 8ae79c7..6a6407b 100644 --- a/keyboards/crkbd/keymaps/sajenim/keymap.c +++ b/keyboards/crkbd/keymaps/sajenim/keymap.c @@ -108,6 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX //`--------------------------' `--------------------------' ), + [SYM] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. XXXXXXX, XXXXXXX, KC_LABK, KC_DLR, KC_RABK, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, XXXXXXX, @@ -119,6 +120,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX //`--------------------------' `--------------------------' ), + + [MOD] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`--------------------------' `--------------------------' + ) }; // clang-format on @@ -205,6 +218,7 @@ void oled_render_master(void) { case NAV: oled_write(" NAV ", false); break; case NUM: oled_write(" NUM ", false); break; case SYM: oled_write(" SYM ", false); break; + case MOD: oled_write(" MOD ", false); break; default: oled_write(" UND ", false); } diff --git a/keyboards/crkbd/keymaps/sajenim/rules.mk b/keyboards/crkbd/keymaps/sajenim/rules.mk index 322f925..5c4a160 100644 --- a/keyboards/crkbd/keymaps/sajenim/rules.mk +++ b/keyboards/crkbd/keymaps/sajenim/rules.mk @@ -11,6 +11,7 @@ CAPS_WORD_ENABLE = yes COMBO_ENABLE = yes OLED_ENABLE = yes REPEAT_KEY_ENABLE = yes +RGBLIGHT_ENABLE = yes # Feature libraries SRC += features/achordion.c