aboutsummaryrefslogtreecommitdiff
path: root/users/kuatsure
diff options
context:
space:
mode:
Diffstat (limited to 'users/kuatsure')
-rw-r--r--users/kuatsure/kuatsure.c111
-rw-r--r--users/kuatsure/kuatsure.h31
-rw-r--r--users/kuatsure/readme.md14
-rw-r--r--users/kuatsure/rules.mk1
4 files changed, 157 insertions, 0 deletions
diff --git a/users/kuatsure/kuatsure.c b/users/kuatsure/kuatsure.c
new file mode 100644
index 000000000..a18713626
--- /dev/null
+++ b/users/kuatsure/kuatsure.c
@@ -0,0 +1,111 @@
1#include "kuatsure.h"
2
3void 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
11void tmux_pane_zoom(void) {
12 tmux_prefix();
13
14 register_code(KC_Z);
15 unregister_code(KC_Z);
16}
17
18void 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
28void tmux_window_switch(uint16_t keycode) {
29 tmux_prefix();
30
31 register_code(keycode);
32 unregister_code(keycode);
33}
34
35LEADER_EXTERNS();
36void 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}
diff --git a/users/kuatsure/kuatsure.h b/users/kuatsure/kuatsure.h
new file mode 100644
index 000000000..56fb684ec
--- /dev/null
+++ b/users/kuatsure/kuatsure.h
@@ -0,0 +1,31 @@
1#ifndef KUATSURE
2#define KUATSURE
3
4#include "quantum.h"
5
6void tmux_prefix(void);
7void tmux_pane_zoom(void);
8void tmux_pane_switch(uint16_t keycode);
9void tmux_window_switch(uint16_t keycode);
10
11#undef LEADER_TIMEOUT
12#define LEADER_TIMEOUT 300
13
14#define LAYOUT_preonic_grid_wrapper(...) LAYOUT_preonic_grid(__VA_ARGS__)
15
16#define _________________NUMBER_L1_________________ KC_1, KC_2, KC_3, KC_4, KC_5
17#define _________________NUMBER_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0
18
19#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
20#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
21#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
22
23#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
24#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
25#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
26
27#define ____________FUNCTION_1____________ KC_F1, KC_F2, KC_F3, KC_F4
28#define ____________FUNCTION_2____________ KC_F5, KC_F6, KC_F7, KC_F8
29#define ____________FUNCTION_3____________ KC_F9, KC_F10, KC_F11, KC_F12
30
31#endif
diff --git a/users/kuatsure/readme.md b/users/kuatsure/readme.md
new file mode 100644
index 000000000..b6d10224f
--- /dev/null
+++ b/users/kuatsure/readme.md
@@ -0,0 +1,14 @@
1Copyright 2018 Jarrett Drouillard jarrett@thestyl.us @kuatsure
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/users/kuatsure/rules.mk b/users/kuatsure/rules.mk
new file mode 100644
index 000000000..11262d0ec
--- /dev/null
+++ b/users/kuatsure/rules.mk
@@ -0,0 +1 @@
SRC += kuatsure.c