Keymap: Adds zen layout for 333fred (#3563)
* Initial commit of zen keymap * Added RGB control for my zen * Fixed ergodox layout. * Reduce brightness. * PR feedback.
This commit is contained in:
committed by
Drashna Jaelre
parent
a6e1cb08c6
commit
9a4db7a860
@@ -34,6 +34,7 @@ void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
break;
|
||||
case DOUBLE:
|
||||
layer_on(VIM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,3 +62,26 @@ void tap_dance_process_record(uint16_t keycode) {
|
||||
tap_dance_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_rgb(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void layer_state_set_rgb(uint32_t state) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user_keyboard(void) {}
|
||||
|
||||
void matrix_scan_user() {
|
||||
static bool first_run = true;
|
||||
if (first_run) {
|
||||
first_run = false;
|
||||
matrix_init_rgb();
|
||||
}
|
||||
matrix_scan_user_keyboard();
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_set_rgb(state);
|
||||
return state;
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#ifndef FRED_333
|
||||
#define FRED_333
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
@@ -18,5 +17,3 @@ enum tap_dance_declarations {
|
||||
void tap_dance_layer_finished(qk_tap_dance_state_t*, void*);
|
||||
void tap_dance_layer_reset(qk_tap_dance_state_t*, void*);
|
||||
void tap_dance_process_record(uint16_t);
|
||||
|
||||
#endif
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifndef FRED333_CONFIG
|
||||
#define FRED333_CONFIG
|
||||
#pragma once
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#endif
|
||||
|
28
users/333fred/rgb.c
Normal file
28
users/333fred/rgb.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "quantum.h"
|
||||
#include "333fred.h"
|
||||
|
||||
void matrix_init_rgb(void) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_sethsv_noeeprom(270, 255, 20);
|
||||
}
|
||||
|
||||
void layer_state_set_rgb(uint32_t state) {
|
||||
switch (biton32(state)) {
|
||||
case BASE:
|
||||
// purple
|
||||
rgblight_sethsv_noeeprom(270, 255, 20);
|
||||
break;
|
||||
case SYMB:
|
||||
// blue
|
||||
rgblight_sethsv_noeeprom(240, 255, 20);
|
||||
break;
|
||||
case VIM:
|
||||
// green
|
||||
rgblight_sethsv_noeeprom(120, 255, 20);
|
||||
break;
|
||||
case GAME:
|
||||
// red
|
||||
rgblight_sethsv_noeeprom(0, 255, 20);
|
||||
break;
|
||||
}
|
||||
}
|
@@ -1,2 +1,5 @@
|
||||
|
||||
SRC += 333fred.c
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
SRC += rgb.c
|
||||
endif
|
||||
|
Reference in New Issue
Block a user