diff options
author | QMK Bot <hello@qmk.fm> | 2021-08-13 19:29:21 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-08-13 19:29:21 +0000 |
commit | fcddaadc56bc689a7296e230e9a2c631be55e0cb (patch) | |
tree | af20ac26c658616ea8b3b81e862b8f737367aa99 /users/jdelkins | |
parent | bd811f6546bcd98383ee0c28240ccd35fbc8549c (diff) | |
parent | 2aeacf9db79439801482c8d2f53147779dd0bb89 (diff) | |
download | qmk_firmware-fcddaadc56bc689a7296e230e9a2c631be55e0cb.tar.gz qmk_firmware-fcddaadc56bc689a7296e230e9a2c631be55e0cb.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/jdelkins')
-rw-r--r-- | users/jdelkins/jdelkins.c | 19 | ||||
-rw-r--r-- | users/jdelkins/rules.mk | 9 |
2 files changed, 23 insertions, 5 deletions
diff --git a/users/jdelkins/jdelkins.c b/users/jdelkins/jdelkins.c index 7577512ec5..e7bef607c9 100644 --- a/users/jdelkins/jdelkins.c +++ b/users/jdelkins/jdelkins.c @@ -193,7 +193,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KB_MAKE: if (!get_mods()) { if (!record->event.pressed) +#ifdef NO_SECRETS + SEND_STRING("make NO_SECRETS=1 " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); +#else SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); +#endif return false; } break; @@ -201,10 +205,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KB_VRSN: if (!get_mods()) { if (!record->event.pressed) { +#ifdef DO_SECRETS +# define SECRET_MSG " (with secrets)" +#else +# define SECRET_MSG +#endif if (user_config.system_mac) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " (mac mode)"); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " (mac mode)" SECRET_MSG); } else { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " (non-mac mode)"); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " (non-mac mode)" SECRET_MSG); } } return false; @@ -227,7 +236,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KB_FLSH: if (!get_mods()) { if (!record->event.pressed) { +#ifdef NO_SECRETS + SEND_STRING("make NO_SECRETS=1 " QMK_KEYBOARD ":" QMK_KEYMAP ":flash\n"); +#else SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":flash\n"); +#endif reset_keyboard(); } return false; @@ -235,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; #ifdef DO_SECRETS - case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo + case KC_SECRET_1 ... KC_SECRET_6: // Secrets! Externally defined strings, not stored in repo if (!record->event.pressed) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); send_secret_string(keycode - KC_SECRET_1); diff --git a/users/jdelkins/rules.mk b/users/jdelkins/rules.mk index 70769c8819..075aab7d3b 100644 --- a/users/jdelkins/rules.mk +++ b/users/jdelkins/rules.mk @@ -1,10 +1,15 @@ SRC += jdelkins.c -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS +ifneq ($(strip $(NO_SECRETS)),) + OPT_DEFS += -DNO_SECRETS endif +ifeq ($(shell test -f users/jdelkins/secrets.h.gpg && echo yes || echo no),yes) +users/jdelkins/jdelkins.c: users/jdelkins/secrets.h + touch $@ + users/jdelkins/secrets.h: users/jdelkins/secrets.h.gpg gpg -d $< >$@ +endif BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |