aboutsummaryrefslogtreecommitdiff
path: root/users/kuchosauronad0/leader.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/kuchosauronad0/leader.c')
-rw-r--r--users/kuchosauronad0/leader.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c
index 611b70074..58935abb3 100644
--- a/users/kuchosauronad0/leader.c
+++ b/users/kuchosauronad0/leader.c
@@ -20,12 +20,9 @@ void matrix_scan_user(void){
20 LEADER_DICTIONARY() { 20 LEADER_DICTIONARY() {
21 leading = false; 21 leading = false;
22 leader_end(); 22 leader_end();
23 // Q is for TMUX
24 // Z is for OS related things
25 // other single key sequences are mostly for terminals and vim
26 23
27 SEQ_ONE_KEY(KC_W) { 24 SEQ_ONE_KEY(KC_W) {
28 // Vim + Tmux Macro, when in command mode in vim: write to file, change to the other pane in the current session and repeat the last command 25 // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command
29 SEND_STRING(":w" SS_TAP(X_ENTER)); 26 SEND_STRING(":w" SS_TAP(X_ENTER));
30 tmux_pane_switch_repeat(); 27 tmux_pane_switch_repeat();
31 } 28 }
@@ -36,42 +33,38 @@ void matrix_scan_user(void){
36 } 33 }
37 34
38 SEQ_ONE_KEY(KC_A) { 35 SEQ_ONE_KEY(KC_A) {
39 // Send the Tmux Prefix and press 'right' arrow 36 // tmux: Send the prefix and press 'right' arrow
40 tmux_prefix(); 37 tmux_prefix();
41 tap_code(KC_RIGHT); 38 tap_code(KC_RIGHT);
42 } 39 }
43 40
44 SEQ_TWO_KEYS(KC_T, KC_T) { 41 SEQ_TWO_KEYS(KC_T, KC_T) {
45 // Send the Tmux Prefix to a nested session 42 // tmux: Send the prefix to a nested session
46 tmux_prefix(); 43 tmux_prefix();
47 tmux_prefix(); 44 tmux_prefix();
48 } 45 }
49 SEQ_TWO_KEYS(KC_Q, KC_A) { 46 SEQ_TWO_KEYS(KC_T, KC_R) {
50 // Switch pane and repeat last action 47 // tmux: Switch pane and repeat last action
51 tmux_pane_switch_repeat(); 48 tmux_pane_switch_repeat();
52 } 49 }
53 50
54 SEQ_TWO_KEYS(KC_Z, KC_P){ 51 SEQ_TWO_KEYS(KC_V, KC_Z){
55 // Press windows key, send string 'plex' and press enter 52 // vim: Zoom pane
56 register_code(KC_LGUI); 53 tap_code16(LCTL(KC_W));
57 register_code(KC_S); 54 tap_code16(LSFT(KC_BSLS));
58 unregister_code(KC_S);
59
60 unregister_code(KC_LGUI);
61 SEND_STRING("plex");
62 tap_code(KC_ENTER);
63 } 55 }
64 56
65 SEQ_TWO_KEYS(KC_Z, KC_F) { 57 SEQ_TWO_KEYS(KC_V, KC_R) {
66 // Open a search 58 // vim: Substitute and place cursor
67 register_code(KC_LGUI); 59 SEND_STRING(":%s///g" SS_TAP(X_LEFT));
68 register_code(KC_S); 60 tap_code(KC_LEFT);
69 unregister_code(KC_S); 61 tap_code(KC_LEFT);
70 unregister_code(KC_LGUI);
71 } 62 }
72 63
73 SEQ_TWO_KEYS(KC_Z, KC_Z) { 64 SEQ_TWO_KEYS(KC_V, KC_T) {
74 SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); 65 // vim: move current pane to new tab
66 tap_code16(LCTL(KC_W));
67 tap_code16(LSFT(KC_T));
75 } 68 }
76 69
77 SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ 70 SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){