diff options
Diffstat (limited to 'users')
| -rw-r--r-- | users/drashna/drashna.c | 76 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 10 | ||||
| -rw-r--r-- | users/drashna/sensitive.h | 8 | ||||
| -rw-r--r-- | users/drashna/template.c | 6 |
4 files changed, 64 insertions, 36 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 1bf029163..b7ca84faf 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 19 | #include "quantum.h" | 19 | #include "quantum.h" |
| 20 | #include "action.h" | 20 | #include "action.h" |
| 21 | #include "version.h" | 21 | #include "version.h" |
| 22 | #include "sensitive.h" | ||
| 22 | 23 | ||
| 23 | #ifdef TAP_DANCE_ENABLE | 24 | #ifdef TAP_DANCE_ENABLE |
| 24 | //define diablo macro timer variables | 25 | //define diablo macro timer variables |
| @@ -78,6 +79,14 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
| 78 | }; | 79 | }; |
| 79 | #endif | 80 | #endif |
| 80 | 81 | ||
| 82 | #ifdef AUDIO_ENABLE | ||
| 83 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 84 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 85 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 86 | float tone_workman[][2] = SONG(PLOVER_SOUND); | ||
| 87 | float tone_hackstartup[][2] = SONG(ONE_UP_SOUND); | ||
| 88 | #endif | ||
| 89 | |||
| 81 | 90 | ||
| 82 | // Add reconfigurable functions here, for keymap customization | 91 | // Add reconfigurable functions here, for keymap customization |
| 83 | // This allows for a global, userspace functions, and continued | 92 | // This allows for a global, userspace functions, and continued |
| @@ -138,6 +147,11 @@ void matrix_init_user(void) { | |||
| 138 | rgblight_mode(5); | 147 | rgblight_mode(5); |
| 139 | } | 148 | } |
| 140 | #endif | 149 | #endif |
| 150 | #ifdef AUDIO_ENABLE | ||
| 151 | // _delay_ms(21); // gets rid of tick | ||
| 152 | // stop_all_notes(); | ||
| 153 | // PLAY_SONG(tone_hackstartup); | ||
| 154 | #endif | ||
| 141 | matrix_init_keymap(); | 155 | matrix_init_keymap(); |
| 142 | } | 156 | } |
| 143 | #ifdef TAP_DANCE_ENABLE | 157 | #ifdef TAP_DANCE_ENABLE |
| @@ -190,13 +204,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 190 | } | 204 | } |
| 191 | 205 | ||
| 192 | 206 | ||
| 193 | #ifdef AUDIO_ENABLE | ||
| 194 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 195 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 196 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 197 | float tone_workman[][2] = SONG(PLOVER_SOUND); | ||
| 198 | #endif | ||
| 199 | |||
| 200 | 207 | ||
| 201 | void persistent_default_layer_set(uint16_t default_layer) { | 208 | void persistent_default_layer_set(uint16_t default_layer) { |
| 202 | eeconfig_update_default_layer(default_layer); | 209 | eeconfig_update_default_layer(default_layer); |
| @@ -427,28 +434,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 427 | #endif | 434 | #endif |
| 428 | case KC_MAKE: | 435 | case KC_MAKE: |
| 429 | if (!record->event.pressed) { | 436 | if (!record->event.pressed) { |
| 430 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); | 437 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP |
| 431 | #ifndef BOOTLOADER_CATERINA | 438 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) |
| 432 | SEND_STRING(":teensy "); | 439 | ":dfu" |
| 433 | #else | 440 | #elif defined(BOOTLOADER_HALFKAY) |
| 434 | SEND_STRING(" "); | 441 | ":teensy" |
| 442 | #elif defined(BOOTLOADER_CATERINA) | ||
| 443 | ":avrdude" | ||
| 435 | #endif | 444 | #endif |
| 436 | #ifdef RGBLIGHT_ENABLE | 445 | #ifdef RGBLIGHT_ENABLE |
| 437 | SEND_STRING("RGBLIGHT_ENABLE=yes "); | 446 | " RGBLIGHT_ENABLE=yes" |
| 438 | #else | 447 | #else |
| 439 | SEND_STRING("RGBLIGHT_ENABLE=no "); | 448 | " RGBLIGHT_ENABLE=no" |
| 440 | #endif | 449 | #endif |
| 441 | #ifdef AUDIO_ENABLE | 450 | #ifdef AUDIO_ENABLE |
| 442 | SEND_STRING("AUDIO_ENABLE=yes "); | 451 | " AUDIO_ENABLE=yes" |
| 443 | #else | 452 | #else |
| 444 | SEND_STRING("AUDIO_ENABLE=no "); | 453 | " AUDIO_ENABLE=no" |
| 445 | #endif | 454 | #endif |
| 446 | #ifdef FAUXCLICKY_ENABLE | 455 | #ifdef FAUXCLICKY_ENABLE |
| 447 | SEND_STRING("FAUXCLICKY_ENABLE=yes "); | 456 | " FAUXCLICKY_ENABLE=yes" |
| 448 | #else | 457 | #else |
| 449 | SEND_STRING("FAUXCLICKY_ENABLE=no "); | 458 | " FAUXCLICKY_ENABLE=no" |
| 450 | #endif | 459 | #endif |
| 451 | SEND_STRING(SS_TAP(X_ENTER)); | 460 | SS_TAP(X_ENTER)); |
| 452 | } | 461 | } |
| 453 | return false; | 462 | return false; |
| 454 | break; | 463 | break; |
| @@ -475,33 +484,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 475 | } | 484 | } |
| 476 | return false; | 485 | return false; |
| 477 | break; | 486 | break; |
| 487 | case KC_SECRET_1 ... KC_SECRET_5: | ||
| 488 | if (!record->event.pressed) { | ||
| 489 | send_string(secret[keycode - KC_SECRET_1]); | ||
| 490 | } | ||
| 491 | return false; | ||
| 492 | break; | ||
| 478 | case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication | 493 | case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication |
| 494 | #ifdef RGBLIGHT_ENABLE | ||
| 479 | if (record->event.pressed) { | 495 | if (record->event.pressed) { |
| 480 | rgb_layer_change = !rgb_layer_change; | 496 | rgb_layer_change = !rgb_layer_change; |
| 481 | } | 497 | } |
| 498 | #endif | ||
| 482 | return false; | 499 | return false; |
| 483 | break; | 500 | break; |
| 484 | case RGB_MOD: | 501 | #ifdef RGBLIGHT_ENABLE |
| 485 | case RGB_SMOD: | 502 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions |
| 486 | case RGB_HUI: | 503 | if (record->event.pressed) { //This disrables layer indication, as it's assumed that if you're changing this ... you want that disabled |
| 487 | case RGB_HUD: | ||
| 488 | case RGB_SAI: | ||
| 489 | case RGB_SAD: | ||
| 490 | case RGB_VAI: | ||
| 491 | case RGB_VAD: | ||
| 492 | case RGB_MODE_PLAIN: | ||
| 493 | case RGB_MODE_BREATHE: | ||
| 494 | case RGB_MODE_RAINBOW: | ||
| 495 | case RGB_MODE_SWIRL: | ||
| 496 | case RGB_MODE_SNAKE: | ||
| 497 | case RGB_MODE_KNIGHT: | ||
| 498 | case RGB_MODE_XMAS: | ||
| 499 | case RGB_MODE_GRADIENT: | ||
| 500 | if (record->event.pressed) { | ||
| 501 | rgb_layer_change = false; | 504 | rgb_layer_change = false; |
| 502 | } | 505 | } |
| 503 | return true; | 506 | return true; |
| 504 | break; | 507 | break; |
| 508 | #endif | ||
| 505 | } | 509 | } |
| 506 | return process_record_keymap(keycode, record); | 510 | return process_record_keymap(keycode, record); |
| 507 | } | 511 | } |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 002af3dd4..4fd42acb9 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 19 | #define USERSPACE | 19 | #define USERSPACE |
| 20 | 20 | ||
| 21 | #include "quantum.h" | 21 | #include "quantum.h" |
| 22 | #include "song_list.h" | ||
| 22 | 23 | ||
| 23 | // Define layer names | 24 | // Define layer names |
| 24 | #define _QWERTY 0 | 25 | #define _QWERTY 0 |
| @@ -86,6 +87,11 @@ enum userrpace_custom_keycodes { | |||
| 86 | KC_MAKE, | 87 | KC_MAKE, |
| 87 | KC_RESET, | 88 | KC_RESET, |
| 88 | KC_RGB_T, | 89 | KC_RGB_T, |
| 90 | KC_SECRET_1, | ||
| 91 | KC_SECRET_2, | ||
| 92 | KC_SECRET_3, | ||
| 93 | KC_SECRET_4, | ||
| 94 | KC_SECRET_5, | ||
| 89 | NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes | 95 | NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes |
| 90 | }; | 96 | }; |
| 91 | 97 | ||
| @@ -99,6 +105,10 @@ enum { | |||
| 99 | #endif | 105 | #endif |
| 100 | 106 | ||
| 101 | 107 | ||
| 108 | #define QMK_KEYS_PER_SCAN 4 | ||
| 102 | 109 | ||
| 110 | #ifdef RGBLIGHT_ENABLE | ||
| 111 | #define RGBLIGHT_SLEEP | ||
| 112 | #endif | ||
| 103 | 113 | ||
| 104 | #endif | 114 | #endif |
diff --git a/users/drashna/sensitive.h b/users/drashna/sensitive.h new file mode 100644 index 000000000..bf47263bd --- /dev/null +++ b/users/drashna/sensitive.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | const char secret[][64] = { | ||
| 2 | "test1", | ||
| 3 | "test2", | ||
| 4 | "test3", | ||
| 5 | "test4", | ||
| 6 | "test5" | ||
| 7 | }; | ||
| 8 | |||
diff --git a/users/drashna/template.c b/users/drashna/template.c index 37f3233df..20dbb96d7 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c | |||
| @@ -21,6 +21,8 @@ __attribute__ ((weak)) | |||
| 21 | uint32_t layer_state_set_keymap (uint32_t state) { | 21 | uint32_t layer_state_set_keymap (uint32_t state) { |
| 22 | return state; | 22 | return state; |
| 23 | } | 23 | } |
| 24 | __attribute__ ((weak)) | ||
| 25 | void led_set_keymap(uint8_t usb_led) {} | ||
| 24 | 26 | ||
| 25 | // Call user matrix init, then call the keymap's init function | 27 | // Call user matrix init, then call the keymap's init function |
| 26 | void matrix_init_user(void) { | 28 | void matrix_init_user(void) { |
| @@ -82,3 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 82 | uint32_t layer_state_set_user (uint32_t state) { | 84 | uint32_t layer_state_set_user (uint32_t state) { |
| 83 | return layer_state_set_keymap (state); | 85 | return layer_state_set_keymap (state); |
| 84 | } | 86 | } |
| 87 | |||
| 88 | void led_set_user(uint8_t usb_led) { | ||
| 89 | led_set_keymap(usb_led); | ||
| 90 | } | ||
