summaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/drashna.c100
-rw-r--r--users/drashna/drashna.h34
2 files changed, 54 insertions, 80 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 6039c7c56b..0bf83cb9f3 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if (__has_include("secrets.h"))
#include "secrets.h"
#else
+// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware
+// And I'm not familar enough to know which is better or why...
PROGMEM const char secret[][64] = {
"test1",
"test2",
@@ -221,7 +223,14 @@ void led_set_user(uint8_t usb_led) {
led_set_keymap(usb_led);
}
-
+void send_game_macro(const char *str) {
+ register_code(is_overwatch ? KC_BSPC : KC_ENTER);
+ unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
+ wait_ms(50);
+ send_string(str);
+ register_code(KC_ENTER);
+ unregister_code(KC_ENTER);
+}
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
@@ -327,124 +336,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case KC_SALT:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Salt, salt, salt...");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Salt, salt, salt...");
}
return false;
break;
case KC_MORESALT:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Please sir, can I have some more salt?!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Please sir, can I have some more salt?!");
}
return false;
break;
case KC_SALTHARD:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Your salt only makes me harder, and even more aggressive!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Your salt only makes me harder, and even more aggressive!");
}
return false;
break;
case KC_GOODGAME:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Good game, everyone!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Good game, everyone!");
}
return false;
break;
case KC_GLHF:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Good luck, have fun!!!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Good luck, have fun!!!");
}
return false;
break;
case KC_SYMM:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("Left click to win!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("Left click to win!");
}
return false;
break;
case KC_JUSTGAME:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
}
return false;
break;
case KC_TORB:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("That was positively riveting!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("That was positively riveting!");
}
return false;
break;
case KC_AIM:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER));
+ send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!");
wait_ms(3000);
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- SEND_STRING("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!" SS_TAP(X_ENTER));
+ send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!");
}
return false;
break;
case KC_C9:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("OMG!!! C9!!!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("OMG!!! C9!!!");
}
return false;
break;
case KC_GGEZ:
if (!record->event.pressed) {
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- wait_ms(50);
- SEND_STRING("That was a fantastic game, though it was a bit easy. Try harder next time!");
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!");
}
return false;
break;
@@ -555,7 +509,7 @@ uint32_t layer_state_set_user(uint32_t state) {
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
break;
case _MEDIA:
- rgblight_set_green;
+ rgblight_set_chartreuse;
rgblight_mode(22);
break;
case _GAMEPAD:
@@ -590,12 +544,16 @@ uint32_t layer_state_set_user(uint32_t state) {
rgblight_set_green;
}
else if (default_layer & (1UL << _WORKMAN)) {
- rgblight_set_purple;
+ rgblight_set_goldenrod;
}
else {
rgblight_set_teal;
}
- rgblight_mode(1);
+ if (biton32(state) == _MODS) {
+ rgblight_mode(2);
+ } else {
+ rgblight_mode(1);
+ }
break;
}
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 8354c55c95..f50bd3106e 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -58,15 +58,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 (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);
+#define rgblight_set_white rgblight_sethsv (0, 0x00, 255);
+#define rgblight_set_red rgblight_sethsv (0, 255, 255);
+#define rgblight_set_coral rgblight_sethsv (16, 176, 255);
+#define rgblight_set_orange rgblight_sethsv (39, 255, 255);
+#define rgblight_set_goldenrod rgblight_sethsv (43, 218, 218);
+#define rgblight_set_gold rgblight_sethsv (51, 255, 255);
+#define rgblight_set_yellow rgblight_sethsv (60, 255, 255);
+#define rgblight_set_chartreuse rgblight_sethsv (90, 255, 255);
+#define rgblight_set_green rgblight_sethsv (120, 255, 255);
+#define rgblight_set_springgreen rgblight_sethsv (150, 255, 255);
+#define rgblight_set_turquoise rgblight_sethsv (174, 90, 112);
+#define rgblight_set_teal rgblight_sethsv (180, 255, 128);
+#define rgblight_set_cyan rgblight_sethsv (180, 255, 255);
+#define rgblight_set_azure rgblight_sethsv (186, 102, 255);
+#define rgblight_set_blue rgblight_sethsv (240, 255, 255);
+#define rgblight_set_purple rgblight_sethsv (270, 255, 255);
+#define rgblight_set_magenta rgblight_sethsv (300, 255, 255);
+#define rgblight_set_pink rgblight_sethsv (330, 128, 255);
+
+//#define rgblight_set_ rgblight_sethsv (0, 255, 255);
#endif // DRASHNA_SETRGB
extern bool is_overwatch;
@@ -136,6 +147,9 @@ enum {
#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.)
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
#ifdef FAUXCLICKY_ENABLE
#define AUD_ON FC_ON
#define AUD_OFF FC_OFF
@@ -201,4 +215,6 @@ enum {
// anything
#define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_LGUI, KC_LBRC, KC_RBRC
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+
+
#endif