]> git.donarmstrong.com Git - qmk_firmware.git/blob - users/kuatsure/kuatsure.c
Fix typo
[qmk_firmware.git] / users / kuatsure / kuatsure.c
1 #include "kuatsure.h"
2
3 void tmux_prefix(void) {
4   register_code(KC_LCTL);
5   register_code(KC_SPC);
6
7   unregister_code(KC_LCTL);
8   unregister_code(KC_SPC);
9 }
10
11 void tmux_pane_zoom(void) {
12   tmux_prefix();
13
14   register_code(KC_Z);
15   unregister_code(KC_Z);
16 }
17
18 void tmux_pane_switch(uint16_t keycode) {
19   tmux_prefix();
20
21   register_code(KC_Q);
22   unregister_code(KC_Q);
23
24   register_code(keycode);
25   unregister_code(keycode);
26 }
27
28 void tmux_window_switch(uint16_t keycode) {
29   tmux_prefix();
30
31   register_code(keycode);
32   unregister_code(keycode);
33 }
34
35 LEADER_EXTERNS();
36 void matrix_scan_user(void) {
37   LEADER_DICTIONARY() {
38     leading = false;
39     leader_end();
40
41     // Available seqs
42     // SEQ_ONE_KEY, SEQ_TWO_KEYS, SEQ_THREE_KEYS
43     // anything you can do in a macro https://docs.qmk.fm/macros.html
44     // https://docs.qmk.fm/feature_leader_key.html
45
46     // Whole Screen Shot
47     SEQ_ONE_KEY(KC_A) {
48       register_code(KC_LGUI);
49       register_code(KC_LSFT);
50       register_code(KC_3);
51
52       unregister_code(KC_3);
53       unregister_code(KC_LSFT);
54       unregister_code(KC_LGUI);
55     }
56
57     // Selective Screen Shot
58     SEQ_ONE_KEY(KC_S) {
59       register_code(KC_LGUI);
60       register_code(KC_LSFT);
61       register_code(KC_4);
62
63       unregister_code(KC_4);
64       unregister_code(KC_LSFT);
65       unregister_code(KC_LGUI);
66     }
67
68     // TMUX - shift to pane 1 and zoom
69     SEQ_ONE_KEY(KC_J) {
70       tmux_pane_switch(KC_1);
71       tmux_pane_zoom();
72     }
73
74     // TMUX - shift to pane 2 and zoom
75     SEQ_ONE_KEY(KC_K) {
76       tmux_pane_switch(KC_2);
77       tmux_pane_zoom();
78     }
79
80     // TMUX - shift to pane 3 and zoom
81     SEQ_ONE_KEY(KC_L) {
82       tmux_pane_switch(KC_3);
83       tmux_pane_zoom();
84     }
85
86     // TMUX - shift to last pane and zoom
87     SEQ_ONE_KEY(KC_SCOLON) {
88       tmux_prefix();
89
90       register_code(KC_SCOLON);
91       unregister_code(KC_SCOLON);
92
93       tmux_pane_zoom();
94     }
95
96     // TMUX - shift to first window
97     SEQ_ONE_KEY(KC_U) {
98       tmux_window_switch(KC_1);
99     }
100
101     // TMUX - shift to second window
102     SEQ_ONE_KEY(KC_I) {
103       tmux_window_switch(KC_2);
104     }
105
106     // TMUX - shift to third window
107     SEQ_ONE_KEY(KC_O) {
108       tmux_window_switch(KC_3);
109     }
110   }
111 }