aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-10-17 11:46:57 -0700
committerGitHub <noreply@github.com>2020-10-17 11:46:57 -0700
commit855dd2d218ba875f1fb7bddfbce8bd260e96184e (patch)
tree3becfc91270b45aa061f529eb08bd1bf32fc0513 /users
parentaa1c1c386543a38d47331d17c414f81c8e11cb29 (diff)
downloadqmk_firmware-855dd2d218ba875f1fb7bddfbce8bd260e96184e.tar.gz
qmk_firmware-855dd2d218ba875f1fb7bddfbce8bd260e96184e.zip
[Keymap] Drashna Code Cleanup (#10656)
* Add Launchpad keymap Note: RGB and Audio won't work when using B pins for audio * Add support for rgb matrix on launchpad * Update config for launchpag * Disable wait on layer change * Update config for ErgoDox EZ * Fixup rgb light userspace code * Move Corne layout to community layouts folder * Update config for corne to support community layouts * Add license header to files * Minor cleanup of userspace config * Update Pimironi Trackball code * Increase debounce time on ergodox * Fix keymap handling * Enable wait for USB for moonlander * Update/add license headers * fix review issues
Diffstat (limited to 'users')
-rw-r--r--users/drashna/config.h28
-rw-r--r--users/drashna/drashna.c31
-rw-r--r--users/drashna/drashna.h31
-rw-r--r--users/drashna/oled_stuff.c16
-rw-r--r--users/drashna/oled_stuff.h16
-rw-r--r--users/drashna/pimoroni_trackball.c57
-rw-r--r--users/drashna/pimoroni_trackball.h17
-rw-r--r--users/drashna/process_records.c379
-rw-r--r--users/drashna/process_records.h16
-rw-r--r--users/drashna/rgb_matrix_stuff.c18
-rw-r--r--users/drashna/rgb_matrix_stuff.h16
-rw-r--r--users/drashna/rgb_stuff.c74
-rw-r--r--users/drashna/rgb_stuff.h16
-rw-r--r--users/drashna/rgblight_breathe_table.h16
-rw-r--r--users/drashna/tap_dances.c16
-rw-r--r--users/drashna/tap_dances.h16
-rw-r--r--users/drashna/template.c16
-rw-r--r--users/drashna/template.h16
-rw-r--r--users/drashna/wrappers.h17
19 files changed, 481 insertions, 331 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 7d83c7884..9fc65e5c9 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3// Use custom magic number so that when switching branches, EEPROM always gets reset 19// Use custom magic number so that when switching branches, EEPROM always gets reset
@@ -7,11 +23,6 @@
7#define USB_POLLING_INTERVAL_MS 1 23#define USB_POLLING_INTERVAL_MS 1
8 24
9#ifdef AUDIO_ENABLE 25#ifdef AUDIO_ENABLE
10# if __GNUC__ > 5
11# if __has_include("drashna_song_list.h")
12# include "drashna_song_list.h"
13# endif // if file exists
14# endif // __GNUC__
15 26
16# define AUDIO_CLICKY 27# define AUDIO_CLICKY
17# define STARTUP_SONG SONG(RICK_ROLL) 28# define STARTUP_SONG SONG(RICK_ROLL)
@@ -49,7 +60,7 @@
49// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 60// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
50// # define EECONFIG_RGB_MATRIX (uint32_t *)16 61// # define EECONFIG_RGB_MATRIX (uint32_t *)16
51 62
52# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) 63# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad)
53# define DISABLE_RGB_MATRIX_ALPHAS_MODS 64# define DISABLE_RGB_MATRIX_ALPHAS_MODS
54# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN 65# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
55# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT 66# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -63,7 +74,7 @@
63# define DISABLE_RGB_MATRIX_CYCLE_ALL 74# define DISABLE_RGB_MATRIX_CYCLE_ALL
64# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT 75# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
65# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN 76# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
66# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN 77// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
67// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL 78// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
68# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON 79# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
69# define DISABLE_RGB_MATRIX_DUAL_BEACON 80# define DISABLE_RGB_MATRIX_DUAL_BEACON
@@ -100,7 +111,7 @@
100 111
101#ifdef QMK_KEYS_PER_SCAN 112#ifdef QMK_KEYS_PER_SCAN
102# undef QMK_KEYS_PER_SCAN 113# undef QMK_KEYS_PER_SCAN
103# define QMK_KEYS_PER_SCAN 1 114# define QMK_KEYS_PER_SCAN 2
104#endif // !QMK_KEYS_PER_SCAN 115#endif // !QMK_KEYS_PER_SCAN
105 116
106// this makes it possible to do rolling combos (zx) with keys that 117// this makes it possible to do rolling combos (zx) with keys that
@@ -111,6 +122,7 @@
111#undef PERMISSIVE_HOLD 122#undef PERMISSIVE_HOLD
112//#define TAPPING_FORCE_HOLD 123//#define TAPPING_FORCE_HOLD
113//#define RETRO_TAPPING 124//#define RETRO_TAPPING
125#define TAPPING_TERM_PER_KEY
114 126
115#define FORCE_NKRO 127#define FORCE_NKRO
116 128
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 5c0f18027..ec6484621 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Christopher Courtney <drashna@live.com> @drashna 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#include "drashna.h" 17#include "drashna.h"
19 18
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index dd2b02258..772005a03 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Christopher Courtney <drashna@live.com> @drashna 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 6503b970e..46288aad2 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "drashna.h" 17#include "drashna.h"
2 18
3extern uint8_t is_master; 19extern uint8_t is_master;
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h
index 662e206b7..7f2786d00 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
index c5bb560b3..9ae094c05 100644
--- a/users/drashna/pimoroni_trackball.c
+++ b/users/drashna/pimoroni_trackball.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "pimoroni_trackball.h" 17#include "pimoroni_trackball.h"
2#include "i2c_master.h" 18#include "i2c_master.h"
3 19
@@ -6,7 +22,7 @@ static int16_t x_offset = 0;
6static int16_t y_offset = 0; 22static int16_t y_offset = 0;
7static int16_t h_offset = 0; 23static int16_t h_offset = 0;
8static int16_t v_offset = 0; 24static int16_t v_offset = 0;
9static float precisionSpeed = 1; 25static float precisionSpeed = 1;
10 26
11#ifndef I2C_TIMEOUT 27#ifndef I2C_TIMEOUT
12# define I2C_TIMEOUT 100 28# define I2C_TIMEOUT 100
@@ -47,17 +63,37 @@ __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* m
47 } 63 }
48} 64}
49 65
66void trackball_register_button(bool pressed, enum mouse_buttons button) {
67 report_mouse_t currentReport = pointing_device_get_report();
68 if (pressed) {
69 currentReport.buttons |= button;
70 } else {
71 currentReport.buttons &= ~button;
72 }
73 pointing_device_set_report(currentReport);
74}
75
50float trackball_get_precision(void) { return precisionSpeed; } 76float trackball_get_precision(void) { return precisionSpeed; }
51void trackball_set_precision(float precision) { precisionSpeed = precision; } 77void trackball_set_precision(float precision) { precisionSpeed = precision; }
52bool trackball_is_scrolling(void) { return scrolling; } 78bool trackball_is_scrolling(void) { return scrolling; }
53void trackball_set_scrolling(bool scroll) { scrolling = scroll; } 79void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
54 80
55__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00,0x00,0x00,0x4F); } 81bool has_report_changed (report_mouse_t first, report_mouse_t second) {
82 return !(
83 (!first.buttons && first.buttons == second.buttons) &&
84 (!first.x && first.x == second.x) &&
85 (!first.y && first.y == second.y) &&
86 (!first.h && first.h == second.h) &&
87 (!first.v && first.v == second.v) );
88}
89
90
91__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); }
56 92
57void pointing_device_task(void) { 93void pointing_device_task(void) {
58 static bool debounce; 94 static bool debounce;
59 static uint16_t debounce_timer; 95 static uint16_t debounce_timer;
60 uint8_t state[5] = {}; 96 uint8_t state[5] = {};
61 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { 97 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
62 if (!state[4] && !debounce) { 98 if (!state[4] && !debounce) {
63 if (scrolling) { 99 if (scrolling) {
@@ -85,7 +121,7 @@ void pointing_device_task(void) {
85 } 121 }
86 } else { 122 } else {
87 if (state[4]) { 123 if (state[4]) {
88 debounce = true; 124 debounce = true;
89 debounce_timer = timer_read(); 125 debounce_timer = timer_read();
90 } 126 }
91 } 127 }
@@ -97,7 +133,6 @@ void pointing_device_task(void) {
97 133
98 trackball_check_click(state[4] & (1 << 7), &mouse); 134 trackball_check_click(state[4] & (1 << 7), &mouse);
99 135
100
101#ifndef PIMORONI_TRACKBALL_ROTATE 136#ifndef PIMORONI_TRACKBALL_ROTATE
102 update_member(&mouse.x, &x_offset); 137 update_member(&mouse.x, &x_offset);
103 update_member(&mouse.y, &y_offset); 138 update_member(&mouse.y, &y_offset);
@@ -110,5 +145,7 @@ void pointing_device_task(void) {
110 update_member(&mouse.v, &h_offset); 145 update_member(&mouse.v, &h_offset);
111#endif 146#endif
112 pointing_device_set_report(mouse); 147 pointing_device_set_report(mouse);
113 pointing_device_send(); 148 if (has_report_changed(mouse, pointing_device_get_report())) {
149 pointing_device_send();
150 }
114} 151}
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h
index 7e8a7cc81..83d248d3f 100644
--- a/users/drashna/pimoroni_trackball.h
+++ b/users/drashna/pimoroni_trackball.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
@@ -11,6 +27,7 @@
11 27
12void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); 28void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
13void trackball_check_click(bool pressed, report_mouse_t *mouse); 29void trackball_check_click(bool pressed, report_mouse_t *mouse);
30void trackball_register_button(bool pressed, enum mouse_buttons button);
14 31
15float trackball_get_precision(void); 32float trackball_get_precision(void);
16void trackball_set_precision(float precision); 33void trackball_set_precision(float precision);
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 8e3d3356e..19bdef73f 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "drashna.h" 17#include "drashna.h"
2 18
3uint16_t copy_paste_timer; 19uint16_t copy_paste_timer;
@@ -21,304 +37,171 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
21 process_record_user_oled(keycode, record); 37 process_record_user_oled(keycode, record);
22#endif // OLED 38#endif // OLED
23 39
24 if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record) 40 if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
25#ifdef RGB_MATRIX_ENABLE 41#ifdef RGB_MATRIX_ENABLE
26 && process_record_user_rgb_matrix(keycode, record) 42 && process_record_user_rgb_matrix(keycode, record)
27#endif 43#endif
28#ifdef RGBLIGHT_ENABLE 44#ifdef RGBLIGHT_ENABLE
29 && process_record_user_rgb_light(keycode, record) 45 && process_record_user_rgb_light(keycode, record)
30#endif 46#endif
31 ) { 47 && true)) {
32 switch (keycode) { 48 return false;
33 case KC_QWERTY ... KC_WORKMAN: 49 }
34 if (record->event.pressed) { 50
35 uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); 51 switch (keycode) {
36 if (!mods) { 52 case KC_QWERTY ... KC_WORKMAN:
37 set_single_persistent_default_layer(keycode - KC_QWERTY); 53 if (record->event.pressed) {
38 } else if (mods & MOD_MASK_SHIFT) { 54 uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
39 set_single_persistent_default_layer(keycode - KC_QWERTY + 4); 55 if (!mods) {
40 } else if (mods & MOD_MASK_CTRL) { 56 set_single_persistent_default_layer(keycode - KC_QWERTY);
41 set_single_persistent_default_layer(keycode - KC_QWERTY + 8); 57 } else if (mods & MOD_MASK_SHIFT) {
42 } 58 set_single_persistent_default_layer(keycode - KC_QWERTY + 4);
59 } else if (mods & MOD_MASK_CTRL) {
60 set_single_persistent_default_layer(keycode - KC_QWERTY + 8);
43 } 61 }
44 break; 62 }
63 break;
45 64
46 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader 65 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
47 if (!record->event.pressed) { 66 if (!record->event.pressed) {
48#ifndef MAKE_BOOTLOADER 67#ifndef MAKE_BOOTLOADER
49 uint8_t temp_mod = mod_config(get_mods()); 68 uint8_t temp_mod = mod_config(get_mods());
50 uint8_t temp_osm = mod_config(get_oneshot_mods()); 69 uint8_t temp_osm = mod_config(get_oneshot_mods());
51 clear_mods(); 70 clear_mods();
52 clear_oneshot_mods(); 71 clear_oneshot_mods();
53#endif 72#endif
54 send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); 73 send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY);
55#ifndef MAKE_BOOTLOADER 74#ifndef MAKE_BOOTLOADER
56 if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) 75 if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
57#endif 76#endif
58 { 77 {
59 send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); 78 send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY);
60#ifndef MAKE_BOOTLOADER 79#ifndef MAKE_BOOTLOADER
61 } else { 80 } else {
62 send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); 81 send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY);
63#endif 82#endif
64 } 83 }
65 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); 84 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY);
66#ifdef RGB_MATRIX_SPLIT_RIGHT 85#ifdef RGB_MATRIX_SPLIT_RIGHT
67 send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); 86 send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY);
68# ifndef OLED_DRIVER_ENABLE 87# ifndef OLED_DRIVER_ENABLE
69 send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); 88 send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY);
70# endif 89# endif
71#endif 90#endif
72 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); 91 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
73 } 92 }
74 93
75 break; 94 break;
76 95
77 case VRSN: // Prints firmware version 96 case VRSN: // Prints firmware version
78 if (record->event.pressed) { 97 if (record->event.pressed) {
79 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); 98 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
80 } 99 }
81 break; 100 break;
82 101
83 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them 102 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
84#ifdef TAP_DANCE_ENABLE 103#ifdef TAP_DANCE_ENABLE
85 if (record->event.pressed) { 104 if (record->event.pressed) {
86 for (uint8_t index = 0; index < 4; index++) { 105 for (uint8_t index = 0; index < 4; index++) {
87 diablo_timer[index].key_interval = 0; 106 diablo_timer[index].key_interval = 0;
88 }
89 } 107 }
108 }
90#endif // TAP_DANCE_ENABLE 109#endif // TAP_DANCE_ENABLE
91 break; 110 break;
92 111
93 case KC_CCCV: // One key copy/paste 112 case KC_CCCV: // One key copy/paste
94 if (record->event.pressed) { 113 if (record->event.pressed) {
95 copy_paste_timer = timer_read(); 114 copy_paste_timer = timer_read();
96 } else { 115 } else {
97 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy 116 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
98 tap_code16(LCTL(KC_C)); 117 tap_code16(LCTL(KC_C));
99 } else { // Tap, paste 118 } else { // Tap, paste
100 tap_code16(LCTL(KC_V)); 119 tap_code16(LCTL(KC_V));
101 }
102 } 120 }
103 break; 121 }
122 break;
104#ifdef UNICODE_ENABLE 123#ifdef UNICODE_ENABLE
105 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 124 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
106 if (record->event.pressed) { 125 if (record->event.pressed) {
107 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); 126 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
108 } 127 }
109 break; 128 break;
110 case UC_TABL: // ┬─┬ノ( º _ ºノ) 129 case UC_TABL: // ┬─┬ノ( º _ ºノ)
111 if (record->event.pressed) { 130 if (record->event.pressed) {
112 send_unicode_string("┬─┬ノ( º _ ºノ)"); 131 send_unicode_string("┬─┬ノ( º _ ºノ)");
113 } 132 }
114 break; 133 break;
115 case UC_SHRG: // ¯\_(ツ)_/¯ 134 case UC_SHRG: // ¯\_(ツ)_/¯
116 if (record->event.pressed) { 135 if (record->event.pressed) {
117 send_unicode_string("¯\\_(ツ)_/¯"); 136 send_unicode_string("¯\\_(ツ)_/¯");
118 } 137 }
119 break; 138 break;
120 case UC_DISA: // ಠ_ಠ 139 case UC_DISA: // ಠ_ಠ
121 if (record->event.pressed) { 140 if (record->event.pressed) {
122 send_unicode_string("ಠ_ಠ"); 141 send_unicode_string("ಠ_ಠ");
123 } 142 }
124 break; 143 break;
125#endif 144#endif
126 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal 145 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
127#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 146#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
128 if (record->event.pressed) { 147 if (record->event.pressed) {
129 userspace_config.rgb_layer_change ^= 1; 148 userspace_config.rgb_layer_change ^= 1;
130 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 149 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
131 eeconfig_update_user(userspace_config.raw); 150 eeconfig_update_user(userspace_config.raw);
132 if (userspace_config.rgb_layer_change) { 151 if (userspace_config.rgb_layer_change) {
133# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) 152# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
134 rgblight_enable_noeeprom(); 153 rgblight_enable_noeeprom();
135# endif 154# endif
136 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) 155 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
137# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) 156# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
138 } else { 157 } else {
139 rgblight_disable_noeeprom(); 158 rgblight_disable_noeeprom();
140# endif 159# endif
141 }
142 } 160 }
161 }
143#endif // RGBLIGHT_ENABLE 162#endif // RGBLIGHT_ENABLE
144 break; 163 break;
145 164
146#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 165#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
147 case RGB_TOG: 166 case RGB_TOG:
148 // Split keyboards need to trigger on key-up for edge-case issue 167 // Split keyboards need to trigger on key-up for edge-case issue
149# ifndef SPLIT_KEYBOARD 168# ifndef SPLIT_KEYBOARD
150 if (record->event.pressed) { 169 if (record->event.pressed) {
151# else 170# else
152 if (!record->event.pressed) { 171 if (!record->event.pressed) {
153# endif 172# endif
154# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) 173# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
155 rgblight_toggle(); 174 rgblight_toggle();
156# endif 175# endif
157# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) 176# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
158 rgb_matrix_toggle(); 177 rgb_matrix_toggle();
159# endif 178# endif
160 } 179 }
161 return false; 180 return false;
162 break; 181 break;
163 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions 182 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
164 if (record->event.pressed) { 183 if (record->event.pressed) {
165 bool is_eeprom_updated; 184 bool is_eeprom_updated;
166# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) 185# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
167 // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled 186 // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
168 if (userspace_config.rgb_layer_change) { 187 if (userspace_config.rgb_layer_change) {
169 userspace_config.rgb_layer_change = false; 188 userspace_config.rgb_layer_change = false;
170 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 189 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
171 is_eeprom_updated = true; 190 is_eeprom_updated = true;
172 } 191 }
173# endif 192# endif
174# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) 193# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
175 if (userspace_config.rgb_matrix_idle_anim) { 194 if (userspace_config.rgb_matrix_idle_anim) {
176 userspace_config.rgb_matrix_idle_anim = false; 195 userspace_config.rgb_matrix_idle_anim = false;
177 dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); 196 dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
178 is_eeprom_updated = true; 197 is_eeprom_updated = true;
179 }
180# endif
181 if (is_eeprom_updated) {
182 eeconfig_update_user(userspace_config.raw);
183 }
184 }
185
186# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)
187 if (keycode == RGB_MODE_FORWARD && record->event.pressed) {
188 uint8_t shifted = get_mods() & (MOD_MASK_SHIFT);
189 if (shifted) {
190# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
191 rgblight_step_reverse();
192# endif
193# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
194 rgb_matrix_step_reverse();
195# endif
196 } else {
197# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
198 rgblight_step();
199# endif
200# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
201 rgb_matrix_step();
202# endif
203 }
204 } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) {
205 uint8_t shifted = get_mods() & (MOD_MASK_SHIFT);
206 if (shifted) {
207# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
208 rgblight_step();
209# endif
210# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
211 rgb_matrix_step();
212# endif
213 } else {
214# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
215 rgblight_step_reverse();
216# endif
217# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
218 rgb_matrix_step_reverse();
219# endif
220 }
221 } else if (keycode == RGB_HUI) {
222# ifndef SPLIT_KEYBOARD
223 if (record->event.pressed) {
224# else
225 if (!record->event.pressed) {
226# endif
227# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
228 rgblight_increase_hue();
229# endif
230# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
231 rgb_matrix_increase_hue();
232# endif
233 }
234 } else if (keycode == RGB_HUD) {
235# ifndef SPLIT_KEYBOARD
236 if (record->event.pressed) {
237# else
238 if (!record->event.pressed) {
239# endif
240# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
241 rgblight_decrease_hue();
242# endif
243# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
244 rgb_matrix_decrease_hue();
245# endif
246 }
247 } else if (keycode == RGB_SAI) {
248# ifndef SPLIT_KEYBOARD
249 if (record->event.pressed) {
250# else
251 if (!record->event.pressed) {
252# endif
253# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
254 rgblight_increase_sat();
255# endif
256# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
257 rgb_matrix_increase_sat();
258# endif
259 }
260 } else if (keycode == RGB_SAD) {
261# ifndef SPLIT_KEYBOARD
262 if (record->event.pressed) {
263# else
264 if (!record->event.pressed) {
265# endif
266# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
267 rgblight_decrease_sat();
268# endif
269# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
270 rgb_matrix_decrease_sat();
271# endif
272 }
273 } else if (keycode == RGB_VAI) {
274# ifndef SPLIT_KEYBOARD
275 if (record->event.pressed) {
276# else
277 if (!record->event.pressed) {
278# endif
279# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
280 rgblight_increase_val();
281# endif
282# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
283 rgb_matrix_increase_val();
284# endif
285 }
286 } else if (keycode == RGB_VAD) {
287# ifndef SPLIT_KEYBOARD
288 if (record->event.pressed) {
289# else
290 if (!record->event.pressed) {
291# endif
292# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
293 rgblight_decrease_val();
294# endif
295# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
296 rgb_matrix_decrease_val();
297# endif
298 }
299 } else if (keycode == RGB_SPI) {
300 if (record->event.pressed) {
301# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
302 rgblight_increase_speed();
303# endif
304# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
305 rgb_matrix_increase_speed();
306# endif
307 }
308 } else if (keycode == RGB_SPD) {
309 if (record->event.pressed) {
310# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
311 rgblight_decrease_speed();
312# endif
313# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
314 rgb_matrix_decrease_speed();
315# endif
316 }
317 } 198 }
318 return false;
319# endif 199# endif
200 if (is_eeprom_updated) {
201 eeconfig_update_user(userspace_config.raw);
202 }
203 }
320#endif 204#endif
321 }
322 } 205 }
323 return true; 206 return true;
324} 207}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 999882d4b..d41be962d 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3 19
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index c9c3224fa..52e261234 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -1,5 +1,21 @@
1#include "drashna.h" 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
2 16
17#include "drashna.h"
18#include "rgb_matrix.h"
3#include "lib/lib8tion/lib8tion.h" 19#include "lib/lib8tion/lib8tion.h"
4extern led_config_t g_led_config; 20extern led_config_t g_led_config;
5 21
diff --git a/users/drashna/rgb_matrix_stuff.h b/users/drashna/rgb_matrix_stuff.h
index 35b01047b..592f9c9e6 100644
--- a/users/drashna/rgb_matrix_stuff.h
+++ b/users/drashna/rgb_matrix_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2#include "quantum.h" 18#include "quantum.h"
3 19
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index defee9ac1..d98f7cc2f 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "drashna.h" 17#include "drashna.h"
2#include "rgb_stuff.h" 18#include "rgb_stuff.h"
3#include "eeprom.h" 19#include "eeprom.h"
@@ -152,14 +168,15 @@ void matrix_scan_rgb_light(void) {
152 168
153void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { 169void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) {
154 rgblight_sethsv_noeeprom(hue, sat, val); 170 rgblight_sethsv_noeeprom(hue, sat, val);
155 wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly 171 // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly
156 rgblight_mode_noeeprom(mode); 172 rgblight_mode_noeeprom(mode);
157} 173}
158 174
159layer_state_t layer_state_set_rgb_light(layer_state_t state) { 175layer_state_t layer_state_set_rgb_light(layer_state_t state) {
160#ifdef RGBLIGHT_ENABLE 176#ifdef RGBLIGHT_ENABLE
161 if (userspace_config.rgb_layer_change) { 177 if (userspace_config.rgb_layer_change) {
162 switch (get_highest_layer(state)) { 178 uint8_t mode = layer_state_cmp(state,_MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT;
179 switch (get_highest_layer(state|default_layer_state)) {
163 case _MACROS: 180 case _MACROS:
164 rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); 181 rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3);
165 break; 182 break;
@@ -181,37 +198,30 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
181 case _ADJUST: 198 case _ADJUST:
182 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); 199 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2);
183 break; 200 break;
184 default: // for any other layers, or the default layer 201 case _COLEMAK:
185 { 202 rgblight_set_hsv_and_mode(HSV_MAGENTA, mode);
186 uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; 203 break;
187 switch (get_highest_layer(default_layer_state)) { 204 case _DVORAK:
188 case _COLEMAK: 205 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode);
189 rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); 206 break;
190 break; 207 case _WORKMAN:
191 case _DVORAK: 208 rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode);
192 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); 209 break;
193 break; 210 case _NORMAN:
194 case _WORKMAN: 211 rgblight_set_hsv_and_mode(HSV_CORAL, mode);
195 rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); 212 break;
196 break; 213 case _MALTRON:
197 case _NORMAN: 214 rgblight_set_hsv_and_mode(HSV_YELLOW, mode);
198 rgblight_set_hsv_and_mode(HSV_CORAL, mode); 215 break;
199 break; 216 case _EUCALYN:
200 case _MALTRON: 217 rgblight_set_hsv_and_mode(HSV_PINK, mode);
201 rgblight_set_hsv_and_mode(HSV_YELLOW, mode); 218 break;
202 break; 219 case _CARPLAX:
203 case _EUCALYN: 220 rgblight_set_hsv_and_mode(HSV_BLUE, mode);
204 rgblight_set_hsv_and_mode(HSV_PINK, mode); 221 break;
205 break; 222 default:
206 case _CARPLAX: 223 rgblight_set_hsv_and_mode(HSV_CYAN, mode);
207 rgblight_set_hsv_and_mode(HSV_BLUE, mode);
208 break;
209 default:
210 rgblight_set_hsv_and_mode(HSV_CYAN, mode);
211 break;
212 }
213 break; 224 break;
214 }
215 } 225 }
216 } 226 }
217#endif // RGBLIGHT_ENABLE 227#endif // RGBLIGHT_ENABLE
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h
index 98a552db1..0153adb54 100644
--- a/users/drashna/rgb_stuff.h
+++ b/users/drashna/rgb_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2#include "quantum.h" 18#include "quantum.h"
3 19
diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h
index 4c6ae38fa..b6f7a13ac 100644
--- a/users/drashna/rgblight_breathe_table.h
+++ b/users/drashna/rgblight_breathe_table.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE 17#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE
2#define RGBLIGHT_EFFECT_BREATHE_TABLE 18#define RGBLIGHT_EFFECT_BREATHE_TABLE
3 19
diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c
index 65019ab75..01873489d 100644
--- a/users/drashna/tap_dances.c
+++ b/users/drashna/tap_dances.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "tap_dances.h" 17#include "tap_dances.h"
2 18
3#define NUM_OF_DIABLO_KEYS 4 19#define NUM_OF_DIABLO_KEYS 4
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h
index 44fa0b934..7f73f2803 100644
--- a/users/drashna/tap_dances.h
+++ b/users/drashna/tap_dances.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3 19
diff --git a/users/drashna/template.c b/users/drashna/template.c
index 833447daa..f98964ae4 100644
--- a/users/drashna/template.c
+++ b/users/drashna/template.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#include "template.h" 17#include "template.h"
2 18
3// Add reconfigurable functions here, for keymap customization 19// Add reconfigurable functions here, for keymap customization
diff --git a/users/drashna/template.h b/users/drashna/template.h
index 178f96e22..cb1ad75d8 100644
--- a/users/drashna/template.h
+++ b/users/drashna/template.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3#include QMK_KEYBOARD_H 19#include QMK_KEYBOARD_H
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h
index d22e2959c..ed4022aaa 100644
--- a/users/drashna/wrappers.h
+++ b/users/drashna/wrappers.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3/* 19/*
@@ -17,6 +33,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro.
17#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) 33#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
18#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) 34#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
19#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__) 35#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
36#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
20 37
21/* 38/*
22Blocks for each of the four major keyboard layouts 39Blocks for each of the four major keyboard layouts