aboutsummaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/drashna.c7
-rw-r--r--users/drashna/drashna.h29
-rw-r--r--users/drashna/readme.md15
-rw-r--r--users/drashna/rules.mk2
4 files changed, 41 insertions, 12 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 95fb793a7..2ac0257b5 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18#include "drashna.h" 18#include "drashna.h"
19#include "quantum.h"
20#include "action.h"
21#include "version.h" 19#include "version.h"
22 20
23#if (__has_include("secrets.h")) 21#if (__has_include("secrets.h"))
@@ -450,8 +448,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
450 ":dfu" 448 ":dfu"
451#elif defined(BOOTLOADER_HALFKAY) 449#elif defined(BOOTLOADER_HALFKAY)
452 ":teensy" 450 ":teensy"
453#elif defined(BOOTLOADER_CATERINA) 451//#elif defined(BOOTLOADER_CATERINA)
454 ":avrdude" 452// ":avrdude"
455#endif 453#endif
456#ifdef RGBLIGHT_ENABLE 454#ifdef RGBLIGHT_ENABLE
457 " RGBLIGHT_ENABLE=yes" 455 " RGBLIGHT_ENABLE=yes"
@@ -572,6 +570,7 @@ uint32_t layer_state_set_user(uint32_t state) {
572 case _COVECUBE: 570 case _COVECUBE:
573 rgblight_set_green; 571 rgblight_set_green;
574 rgblight_mode(2); 572 rgblight_mode(2);
573 break;
575 default: 574 default:
576 if (default_layer & (1UL << _COLEMAK)) { 575 if (default_layer & (1UL << _COLEMAK)) {
577 rgblight_set_magenta; 576 rgblight_set_magenta;
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 0b9347f1d..2475c99d4 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -45,17 +45,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
45#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) 45#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
46#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) 46#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
47 47
48#ifdef RGBLIGHT_ENABLE 48#ifndef RGBLIGHT_ANIMATIONS // add "EXTRA_FLADS=-DDRASHNA_SETRGB" to enable this ... but don't
49#define rgblight_set_blue rgblight_setrgb (0x00, 0x00, 0xFF);
50#define rgblight_set_red rgblight_setrgb (0xFF, 0x00, 0x00);
51#define rgblight_set_green rgblight_setrgb (0x00, 0xFF, 0x00);
52#define rgblight_set_orange rgblight_setrgb (0xFF, 0x80, 0x00);
53#define rgblight_set_teal rgblight_setrgb (0x00, 0xFF, 0xFF);
54#define rgblight_set_magenta rgblight_setrgb (0xFF, 0x00, 0xFF);
55#define rgblight_set_yellow rgblight_setrgb (0xFF, 0xFF, 0x00);
56#define rgblight_set_purple rgblight_setrgb (0x7A, 0x00, 0xFF);
57#define rgblight_set_white rgblight_setrgb (0xFF, 0xFF, 0xFF);
58#else
49#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); 59#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
50#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF); 60#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
51#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); 61#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
52#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); 62#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
53#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); 63#define rgblight_set_teal rgblight_sethsv (0xB4, 0xFF, 0xFF);
54#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); 64#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
55#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF); 65#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
56#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); 66#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
57#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); 67#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF);
58#endif 68#endif // DRASHNA_SETRGB
59 69
60extern bool is_overwatch; 70extern bool is_overwatch;
61extern bool rgb_layer_change; 71extern bool rgb_layer_change;
@@ -103,6 +113,17 @@ enum {
103}; 113};
104#endif 114#endif
105 115
116#ifdef TAP_DANCE_ENABLE
117#define KC_D3_1 TD(TD_D3_1)
118#define KC_D3_2 TD(TD_D3_2)
119#define KC_D3_3 TD(TD_D3_3)
120#define KC_D3_4 TD(TD_D3_4)
121#else
122#define KC_D3_1 KC_1
123#define KC_D3_2 KC_2
124#define KC_D3_3 KC_3
125#define KC_D3_4 KC_4
126#endif
106 127
107#define QMK_KEYS_PER_SCAN 8 128#define QMK_KEYS_PER_SCAN 8
108 129
@@ -110,4 +131,6 @@ enum {
110#define RGBLIGHT_SLEEP 131#define RGBLIGHT_SLEEP
111#endif 132#endif
112 133
134#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
135
113#endif 136#endif
diff --git a/users/drashna/readme.md b/users/drashna/readme.md
index 0523be2a6..e77948ea9 100644
--- a/users/drashna/readme.md
+++ b/users/drashna/readme.md
@@ -4,19 +4,26 @@ Overview
4This is my personal userspace file. Most of my code exists here, as it's heavily shared. 4This is my personal userspace file. Most of my code exists here, as it's heavily shared.
5 5
6 6
7Custom handlers 7Custom userspace handlers
8--------------- 8-------------------------
9
10Specifically QMK works by using customized handlers for everything. This allows for multiple levels of customization.
11
12`matrix_scan` calls `matrix_scan_quantum`, which alls `matrix_scan_kb`, which calls `matrix_scan_user`.
13`process_record` calls a bunch of stuff, but eventually calls `process_record_kb` which calls `process_record_user`
14The same goes for `matrix_init`, `layer_state_set`, `led_set`, and a few other functions.
9 15
10All (most) `_user` functions are handled here instead. To allow keyboard specific configuration, I've created `_keymap` functions that can be called by the keymap.c files instead. 16All (most) `_user` functions are handled here instead. To allow keyboard specific configuration, I've created `_keymap` functions that can be called by the keymap.c files instead.
11 17
12This allows for keyboard specific configuration while maintaining the ability to customize the board. 18This allows for keyboard specific configuration while maintaining the ability to customize the board.
13 19
14My Ergodox EZ Keymap is a good example of this, as it uses the LEDs as modifier indicators. 20My [Ergodox EZ Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/drashna/keymap.c#L399) is a good example of this, as it uses the LEDs as modifier indicators.
21
15 22
16Custom Keycodes 23Custom Keycodes
17--------------- 24---------------
18 25
19Keycods are defined in the drashna.h file and need to be included in the keymap.c files, so that they can be used there. 26Keycodes are defined in the drashna.h file and need to be included in the keymap.c files, so that they can be used there.
20 27
21A bunch of macros are present and are only included on boards that are not the Ergodox EZ or Orthodox, as they are not needed for those boards. 28A bunch of macros are present and are only included on boards that are not the Ergodox EZ or Orthodox, as they are not needed for those boards.
22 29
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 6ce1ff5ba..ab2ab607d 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -1,3 +1,3 @@
1 1
2SRC += drashna.c 2SRC += drashna.c
3EXTRAFLAGS = -flto 3EXTRAFLAGS += -flto