summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/arkag/arkag.c213
-rw-r--r--users/arkag/config.h5
2 files changed, 84 insertions, 134 deletions
diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c
index a35e13ed6b..212d06de67 100644
--- a/users/arkag/arkag.c
+++ b/users/arkag/arkag.c
@@ -370,115 +370,70 @@ void matrix_init_user(void) {
set_os(current_os, false);
}
+LEADER_EXTERNS();
+
void matrix_scan_user(void) {
check_state();
flash_rgb();
fade_rgb();
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case M_PMOD:
- if (record->event.pressed) {
- pri_mod(true);
- } else {
- pri_mod(false);
- }
- return false;
+ LEADER_DICTIONARY() {
+ leading = false;
+ leader_end();
- case M_SMOD:
- if (record->event.pressed) {
- sec_mod(true);
- } else {
- sec_mod(false);
- }
- return false;
-
- case M_P_B:
- if (record->event.pressed) {
+ // begin OS functions
+ SEQ_TWO_KEYS(KC_P, KC_B) {
if (current_os == OS_WIN) {
SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_PAUSE) SS_UP(X_LGUI));
} else {
}
}
- return false;
-
- case M_C_A_D:
- if (record->event.pressed) {
+ SEQ_THREE_KEYS(KC_C, KC_A, KC_D) {
if (current_os == OS_WIN) {
SEND_STRING(SS_DOWN(X_LCTRL) SS_DOWN(X_LALT) SS_TAP(X_DELETE) SS_UP(X_LALT) SS_UP(X_LCTRL));
} else {
}
}
- return false;
-
- case M_CALC:
- if (record->event.pressed) {
+ SEQ_FOUR_KEYS(KC_C, KC_A, KC_L, KC_C) {
if (current_os == OS_WIN) {
SEND_STRING(SS_TAP(X_CALCULATOR));
} else if (current_os == OS_MAC) {
SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI) "calculator" SS_TAP(X_ENTER));
}
}
- return false;
-
- case M_OS:
- if (record->event.pressed) {
- set_os((current_os+1) % _OS_COUNT, true);
- }
- return false;
-
- case M_LOD:
- if (record->event.pressed) {
- send_unicode_hex_string("0CA0 005F 005F 0CA0");
- }
- return false;
+ // end OS functions
- case M_LENNY:
- if (record->event.pressed) {
- send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029");
+ // begin format functions
+ SEQ_ONE_KEY(KC_B) {
+ surround_type(4, KC_8, true);
}
- return false;
-
-
- case M_TF:
- if (record->event.pressed) {
- send_unicode_hex_string("0028 256F 2035 0414 2032 0029 256F 5F61 253B 2501 253B");
+ SEQ_ONE_KEY(KC_I) {
+ surround_type(2, KC_8, true);
}
- return false;
-
- case M_UF:
- if (record->event.pressed) {
- send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029");
+ SEQ_ONE_KEY(KC_U) {
+ surround_type(4, KC_MINS, true);
}
- return false;
-
- case M_SHRUG:
- if (record->event.pressed) {
- send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
+ SEQ_ONE_KEY(KC_S) {
+ surround_type(4, KC_GRAVE, true);
}
- return false;
-
- case M_TM:
- if (record->event.pressed) {
- send_unicode_hex_string("2122");
+ SEQ_TWO_KEYS(KC_S, KC_S) {
+ if (current_os == OS_MAC) {
+ long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4});
+ } else if (current_os == OS_WIN) {
+ long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S});
+ } else {
+ return;
+ }
}
- return false;
-
- case M_REPO:
- if (record->event.pressed) {
- SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag");
+ SEQ_ONE_KEY(KC_C) {
+ surround_type(2, KC_GRAVE, false);
}
- return false;
-
- case M_GGT:
- if (record->event.pressed) {
- SEND_STRING("@GrahamGoldenTech.com");
+ SEQ_TWO_KEYS(KC_C, KC_C) {
+ surround_type(6, KC_GRAVE, false);
}
- return false;
+ // end format functions
- case M_SNIPT:
- if (record->event.pressed) {
+ // start fancy functions
+ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
surround_type(6, KC_GRAVE, false);
pri_mod(true);
tap_key(KC_V);
@@ -488,44 +443,68 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
tap_key(KC_RGHT);
tap_key(KC_ENTER);
}
- return false;
+ // end fancy functions
- case M_BOLD:
- if (record->event.pressed) {
- surround_type(4, KC_8, true);
+ // start typing functions
+ SEQ_TWO_KEYS(KC_T, KC_M) {
+ // ™
+ send_unicode_hex_string("2122");
}
- return false;
+ SEQ_THREE_KEYS(KC_G, KC_G, KC_T) {
+ SEND_STRING("@GrahamGoldenTech.com");
+ }
+ SEQ_THREE_KEYS(KC_L, KC_O, KC_D) {
+ // ಠ__ಠ
+ send_unicode_hex_string("0CA0 005F 005F 0CA0");
+ }
+ SEQ_FOUR_KEYS(KC_R, KC_E, KC_P, KC_O) {
+ SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag");
+ }
+ SEQ_FOUR_KEYS(KC_F, KC_L, KC_I, KC_P) {
+ // (╯‵Д′)╯彡┻━┻
+ send_unicode_hex_string("0028 256F 2035 0414 2032 0029 256F 5F61 253B 2501 253B");
+ }
+ SEQ_FIVE_KEYS(KC_U, KC_F, KC_L, KC_I, KC_P) {
+ // ┬─┬ノ( º _ º ノ)
+ send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029");
+ }
+ SEQ_FIVE_KEYS(KC_L, KC_E, KC_N, KC_N, KC_Y) {
+ // ( ͡° ͜ʖ ͡°)
+ send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029");
+ }
+ SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) {
+ // ¯\_(ツ)_/¯
+ send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
+ }
+ // end typing functions
- case M_ITAL:
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case M_PMOD:
if (record->event.pressed) {
- surround_type(2, KC_8, true);
+ pri_mod(true);
+ } else {
+ pri_mod(false);
}
return false;
- case M_ULIN:
+ case M_SMOD:
if (record->event.pressed) {
- surround_type(4, KC_MINS, true);
+ sec_mod(true);
+ } else {
+ sec_mod(false);
}
return false;
- case KC_LSFT:
+ case M_OS:
if (record->event.pressed) {
- save_color(underglow);
- underglow = mod_color(underglow, true, 75);
- SEND_STRING(SS_DOWN(X_LSHIFT));
- } else {
- reset_color();
- SEND_STRING(SS_UP(X_LSHIFT));
+ set_os((current_os+1) % _OS_COUNT, true);
}
return false;
- case MEDIA:
- case LAZY:
- case KEEB:
- case RAISE:
- case LOWER:
- return true;
-
default:
if (record->event.pressed) {
state = active;
@@ -535,36 +514,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
-uint32_t layer_state_set_user(uint32_t state) {
- switch (biton32(state)) {
- case _LAZY:
- save_color(underglow);
- underglow = mod_color(underglow, true, 50);
- break;
- case _MEDIA:
- save_color(underglow);
- underglow = mod_color(underglow, true, 150);
- break;
- case _KEEB:
- save_color(underglow);
- underglow = mod_color(underglow, false, 150);
- break;
- case _LOWER:
- save_color(underglow);
- underglow = mod_color(underglow, false, 100);
- break;
- case _RAISE:
- save_color(underglow);
- underglow = mod_color(underglow, true, 100);
- break;
- default:
- reset_color();
- break;
- }
- set_color(underglow, false);
- return state;
-}
-
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_3_GRV_ACT] = ACTION_TAP_DANCE_FN (dance_3),
diff --git a/users/arkag/config.h b/users/arkag/config.h
index e715e5534e..2e0a9ad019 100644
--- a/users/arkag/config.h
+++ b/users/arkag/config.h
@@ -1,5 +1,6 @@
#pragma once
-#define TAPPING_TERM 200
+#define TAPPING_TERM 200
+#define LEADER_TIMEOUT 250
-#define IGNORE_MOD_TAP_INTERRUPT
+#define LEADER_PER_KEY_TIMING