Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qmk-bot committed Aug 13, 2021
2 parents ba5aeef + 089e46d commit 5f0ad76
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
19 changes: 16 additions & 3 deletions users/jdelkins/jdelkins.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,27 @@ 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;

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;
Expand All @@ -227,15 +236,19 @@ 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;
}
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);
Expand Down
9 changes: 7 additions & 2 deletions users/jdelkins/rules.mk
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5f0ad76

Please sign in to comment.