diff options
author | Drashna Jaelre <drashna@live.com> | 2018-01-01 14:21:01 -0800 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-01-01 17:21:01 -0500 |
commit | 17200f47123b839ee0a5e4f2dfd33a00dff09e90 (patch) | |
tree | 46a6be6e61361e1f548daa1ce6cb461f5c291fee /users | |
parent | eb903c7623f97ecd51a0fe4a0ca911bdcbc204cf (diff) | |
download | qmk_firmware-17200f47123b839ee0a5e4f2dfd33a00dff09e90.tar.gz |
Clean up and tweaks of drashna keymaps and userspace (#2200)
* Minor tweaks
modified: users/drashna/drashna.c
* Fix Workman ASCII art
* Add OSM for shifts
* Make Viterbi's 00 code consistant
* Minor Cleanup off Userspace
* Change Tapping Term on Ergodox
* Re-add EEPROM code
* Minor updates and tweaks
* Use QMK_H variables to make keymaps more universal
* Forgot 'break;' for covecube layer
* Tweak Viterbi files now that I have hands on
* Add secrets to Ergodox
* RGB tweaks to Viterbi
* Viterbi RGB layout tweeks
* Minor tweaks
* Add One Shot Mod tap toggle
* Add Faux Clicky to Viterbi, and disable controller's LEDs
* Minor tweaks
* Move D3 keycode defines into userspace
* Updated Userspace Readme
Diffstat (limited to 'users')
-rw-r--r-- | users/drashna/drashna.c | 7 | ||||
-rw-r--r-- | users/drashna/drashna.h | 29 | ||||
-rw-r--r-- | users/drashna/readme.md | 15 | ||||
-rw-r--r-- | users/drashna/rules.mk | 2 |
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/>. */ #include "drashna.h" -#include "quantum.h" -#include "action.h" #include "version.h" #if (__has_include("secrets.h")) @@ -450,8 +448,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ":dfu" #elif defined(BOOTLOADER_HALFKAY) ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" +//#elif defined(BOOTLOADER_CATERINA) +// ":avrdude" #endif #ifdef RGBLIGHT_ENABLE " RGBLIGHT_ENABLE=yes" @@ -572,6 +570,7 @@ uint32_t layer_state_set_user(uint32_t state) { case _COVECUBE: rgblight_set_green; rgblight_mode(2); + break; default: if (default_layer & (1UL << _COLEMAK)) { 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/>. #define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#ifdef RGBLIGHT_ENABLE +#ifndef RGBLIGHT_ANIMATIONS // add "EXTRA_FLADS=-DDRASHNA_SETRGB" to enable this ... but don't +#define rgblight_set_blue rgblight_setrgb (0x00, 0x00, 0xFF); +#define rgblight_set_red rgblight_setrgb (0xFF, 0x00, 0x00); +#define rgblight_set_green rgblight_setrgb (0x00, 0xFF, 0x00); +#define rgblight_set_orange rgblight_setrgb (0xFF, 0x80, 0x00); +#define rgblight_set_teal rgblight_setrgb (0x00, 0xFF, 0xFF); +#define rgblight_set_magenta rgblight_setrgb (0xFF, 0x00, 0xFF); +#define rgblight_set_yellow rgblight_setrgb (0xFF, 0xFF, 0x00); +#define rgblight_set_purple rgblight_setrgb (0x7A, 0x00, 0xFF); +#define rgblight_set_white rgblight_setrgb (0xFF, 0xFF, 0xFF); +#else #define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); #define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF); #define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); #define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); -#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); +#define rgblight_set_teal rgblight_sethsv (0xB4, 0xFF, 0xFF); #define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); #define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF); #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); #define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); -#endif +#endif // DRASHNA_SETRGB extern bool is_overwatch; extern bool rgb_layer_change; @@ -103,6 +113,17 @@ enum { }; #endif +#ifdef TAP_DANCE_ENABLE +#define KC_D3_1 TD(TD_D3_1) +#define KC_D3_2 TD(TD_D3_2) +#define KC_D3_3 TD(TD_D3_3) +#define KC_D3_4 TD(TD_D3_4) +#else +#define KC_D3_1 KC_1 +#define KC_D3_2 KC_2 +#define KC_D3_3 KC_3 +#define KC_D3_4 KC_4 +#endif #define QMK_KEYS_PER_SCAN 8 @@ -110,4 +131,6 @@ enum { #define RGBLIGHT_SLEEP #endif +#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.) + #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 This is my personal userspace file. Most of my code exists here, as it's heavily shared. -Custom handlers ---------------- +Custom userspace handlers +------------------------- + +Specifically QMK works by using customized handlers for everything. This allows for multiple levels of customization. + +`matrix_scan` calls `matrix_scan_quantum`, which alls `matrix_scan_kb`, which calls `matrix_scan_user`. +`process_record` calls a bunch of stuff, but eventually calls `process_record_kb` which calls `process_record_user` +The same goes for `matrix_init`, `layer_state_set`, `led_set`, and a few other functions. All (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. This allows for keyboard specific configuration while maintaining the ability to customize the board. -My Ergodox EZ Keymap is a good example of this, as it uses the LEDs as modifier indicators. +My [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. + Custom Keycodes --------------- -Keycods are defined in the drashna.h file and need to be included in the keymap.c files, so that they can be used there. +Keycodes are defined in the drashna.h file and need to be included in the keymap.c files, so that they can be used there. A 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. 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 @@ SRC += drashna.c -EXTRAFLAGS = -flto +EXTRAFLAGS += -flto |