summaryrefslogtreecommitdiffstats
path: root/layouts/community
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-01-06 01:49:49 -0800
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2020-01-06 01:49:48 -0800
commit00d3061e02fa5fedaa6e6cebd310d4e716ffffee (patch)
treef799486433da3995d7db6c44f4a32d2a86be4ef8 /layouts/community
parentb3b115bcc4466b0320a6725c8e994a9ef4186328 (diff)
[Keymap] Cleanup of Drashna code (#7800)
* ifdef rgb stuff like a madman for RGB Coexistance * Re-enable RGB Light on Planck * fix RGB Coexistance issue * Tweak feature settings for Ergodox EZ Glow * Their powers combine, and I am Captain RGB This one is for noroadsleft and yan. * Limit brightness when both RGB features are enabled * Change shutdown method * Add RGB Coexistience stuff to keymap * disable RGBLIGHT_SLEEP until a solution can be found * Disable Unicode on the kyria * Fix up Iris rev defines * Fix up community layouts to compile properly * Cleanup rgb stuff * Merge ergodox keymaps * Update CCCV macro to use tap_code16 * Enable Solenoid on C39 Because josh couldn't * Enable RGB Light, not Matrix on rev6 keymap * Only enable LTO on non-ARM boards * Clean up Bootmagic OLED display * Enable RGBLIGHT_SPLIT on kyria Not that it does anything * Add hotkey for discord
Diffstat (limited to 'layouts/community')
-rw-r--r--layouts/community/ergodox/drashna/config.h15
-rw-r--r--layouts/community/ergodox/drashna/keymap.c41
-rw-r--r--layouts/community/ergodox/drashna/rules.mk17
-rw-r--r--layouts/community/ergodox/drashna_glow/config.h9
-rw-r--r--layouts/community/ergodox/drashna_glow/keymap.c2
-rw-r--r--layouts/community/ergodox/drashna_glow/rules.mk13
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c13
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk20
-rw-r--r--layouts/community/ortho_5x12/drashna/rules.mk1
9 files changed, 61 insertions, 70 deletions
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 0091ebcde8..ce25b0646b 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -6,10 +6,13 @@
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
+# ifdef RGB_MATRIX_ENABLE
+# define RGBLIGHT_DISABLE_KEYCODES
+# endif
#endif // RGBLIGHT_ENABLE
#undef PRODUCT
-#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
+#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity
#undef DEBOUNCE
#define DEBOUNCE 30
@@ -17,3 +20,13 @@
#define TAPPING_TERM_PER_KEY
#define ERGODOX_LED_30
+
+#ifdef RGB_MATRIX_ENABLE
+# undef RGB_MATRIX_LED_PROCESS_LIMIT
+# undef RGB_MATRIX_LED_FLUSH_LIMIT
+# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
+# define RGBLIGHT_LIMIT_VAL 175
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS (RGBLIGHT_LIMIT_VAL + 25)
+# undef RGBLIGHT_SLEEP
+# endif
+#endif
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 8308bfdaa1..69066a47cc 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -280,7 +280,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
- KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
+ KC_MAKE, _______, _______, _______, _______, _______, UC_MOD, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL,
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS),
@@ -382,31 +382,32 @@ void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); }
void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); }
void rgb_matrix_indicators_user(void) {
- if (userspace_config.rgb_layer_change &&
-# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
- !g_suspend_state &&
-# endif
+ if (g_suspend_state || !rgb_matrix_config.enable) return;
+
+ if (layer_state_is(_GAMEPAD)) {
+ rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
+ rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
+ rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
+ rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R
+ rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A
+ rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S
+ rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D
+ rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F
+
+ rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1
+ rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2
+ rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3
+ }
+
# if defined(RGBLIGHT_ENABLE)
- (!rgblight_config.enable && rgb_matrix_config.enable)
+ if (!userspace_config.rgb_layer_change)
# else
- rgb_matrix_config.enable
+ if (userspace_config.rgb_layer_change)
# endif
- ) {
+ {
switch (get_highest_layer(layer_state)) {
case _GAMEPAD:
rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
- rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
- rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
- rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
- rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R
- rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A
- rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S
- rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D
- rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F
-
- rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1
- rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2
- rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3
break;
case _DIABLO:
rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER);
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk
index 3aee59df6c..78a3d15840 100644
--- a/layouts/community/ergodox/drashna/rules.mk
+++ b/layouts/community/ergodox/drashna/rules.mk
@@ -1,19 +1,20 @@
-TAP_DANCE_ENABLE = yes
+BOOTMAGIC_ENABLE = lite
+TAP_DANCE_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
+CONSOLE_ENABLE = no
SPACE_CADET_ENABLE = no
+
ifeq ($(strip $(KEYBOARD)), ergodox_ez)
- RGBLIGHT_ENABLE = yes
- RGB_MATRIX_ENABLE = no
+ RGBLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = yes
+ RGBLIGHT_TWINKLE = no
+ INDICATOR_LIGHTS = no
+ RGBLIGHT_STARTUP_ANIMATION = no
endif
-CONSOLE_ENABLE = no
-BOOTMAGIC_ENABLE = yes
UNICODE_ENABLE = yes
UNICDOEMAP_ENABLE = no
-RGBLIGHT_TWINKLE = no
-INDICATOR_LIGHTS = no
-RGBLIGHT_STARTUP_ANIMATION = yes
DEBOUNCE_TYPE = eager_pr
diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h
deleted file mode 100644
index 6431cb4ff8..0000000000
--- a/layouts/community/ergodox/drashna_glow/config.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#include "../drashna/config.h"
-
-#undef PRODUCT
-#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow
-
-#undef RGB_MATRIX_LED_PROCESS_LIMIT
-#undef RGB_MATRIX_LED_FLUSH_LIMIT
diff --git a/layouts/community/ergodox/drashna_glow/keymap.c b/layouts/community/ergodox/drashna_glow/keymap.c
deleted file mode 100644
index 7d4bdbec50..0000000000
--- a/layouts/community/ergodox/drashna_glow/keymap.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* placeholder file */
-#include QMK_KEYBOARD_H
diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk
deleted file mode 100644
index 45addc7c22..0000000000
--- a/layouts/community/ergodox/drashna_glow/rules.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-USER_NAME := drashna
-
-CORRECTED_LAYOUT := $(LAYOUTS_REPO)/$(LAYOUT)/drashna
-
-SRC += $(CORRECTED_LAYOUT)/keymap.c
-
--include $(CORRECTED_LAYOUT)/rules.mk
-
-ifeq ($(strip $(KEYBOARD)), ergodox_ez)
- RGBLIGHT_ENABLE = no
- RGB_MATRIX_ENABLE = yes
-# TAP_DANCE_ENABLE = no
-endif
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index c3899cd036..d2957d8fdc 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -224,16 +224,14 @@ void rgb_matrix_indicators_user(void) {
is_ez = true;
# endif
- if (userspace_config.rgb_layer_change &&
-# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
- !g_suspend_state &&
-# endif
+ if (g_suspend_state || !rgb_matrix_config.enable) return;
+
# if defined(RGBLIGHT_ENABLE)
- (!rgblight_config.enable && rgb_matrix_config.enable)
+ if (!userspace_config.rgb_layer_change)
# else
- rgb_matrix_config.enable
+ if (userspace_config.rgb_layer_change)
# endif
- ) {
+ {
switch (get_highest_layer(layer_state)) {
case _GAMEPAD:
rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
@@ -297,6 +295,7 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21);
break;
}
+
if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) {
if (!layer_state_cmp(layer_state, _ADJUST)) {
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk
index 38d0d45176..e4fe905341 100644
--- a/layouts/community/ortho_4x12/drashna/rules.mk
+++ b/layouts/community/ortho_4x12/drashna/rules.mk
@@ -2,7 +2,6 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
TAP_DANCE_ENABLE = no
-AUDIO_ENABLE = yes
SPACE_CADET_ENABLE = no
NKRO_ENABLE = yes
@@ -11,20 +10,22 @@ ifneq ($(strip $(KEYBOARD)), planck/rev6)
COMMAND_ENABLE = no
ifeq ($(strip $(LAYOUT_HAS_RGB)), yes)
RGBLIGHT_ENABLE = yes
- endif
- INDICATOR_LIGHTS = yes
- RGBLIGHT_TWINKLE = yes
- RGBLIGHT_STARTUP_ANIMATION = yes
+ INDICATOR_LIGHTS = yes
+ RGBLIGHT_TWINKLE = yes
+ RGBLIGHT_STARTUP_ANIMATION = yes
+ endif
else
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
- RGBLIGHT_ENABLE = no
- RGB_MATRIX_ENABLE = WS2812
+ RGBLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = no
+ AUDIO_ENABLE = yes
endif
ifeq ($(strip $(KEYBOARD)), planck/light)
RGB_MATRIX_ENABLE = yes
- RGBLIGHT_ENABLE = no
- RGBLIGHT_STARTUP_ANIMATION = no
+ RGBLIGHT_ENABLE = yes
+ RGBLIGHT_STARTUP_ANIMATION = yes
+ AUDIO_ENABLE = yes
# HAPTIC_ENABLE += SOLENOID
endif
ifeq ($(strip $(KEYBOARD)), planck/ez)
@@ -37,4 +38,5 @@ ifeq ($(strip $(KEYBOARD)), planck/ez)
RGBLIGHT_STARTUP_ANIMATION = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
+ AUDIO_ENABLE = yes
endif
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk
index cae4b27bab..b5d55a681d 100644
--- a/layouts/community/ortho_5x12/drashna/rules.mk
+++ b/layouts/community/ortho_5x12/drashna/rules.mk
@@ -4,7 +4,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
TAP_DANCE_ENABLE = no
-AUDIO_ENABLE = yes
NKRO_ENABLE = yes
ifeq ($(strip $(KEYBOARD)), fractal)