2018-05-31 03:49:20 +06:00
|
|
|
#include "kuatsure.h"
|
2019-05-23 10:40:16 +06:00
|
|
|
#include "version.h"
|
2018-05-31 03:49:20 +06:00
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
|
|
[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT),
|
2021-08-12 21:56:25 +06:00
|
|
|
[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT),
|
|
|
|
[TD_SLSH] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS),
|
2019-05-23 10:40:16 +06:00
|
|
|
};
|
2018-05-31 03:49:20 +06:00
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
__attribute__ ((weak))
|
|
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
return true;
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
switch (keycode) {
|
|
|
|
case KB_MAKE:
|
|
|
|
if (!record->event.pressed) {
|
|
|
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER));
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KB_VRSN:
|
|
|
|
if (!record->event.pressed) {
|
|
|
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KB_FLSH:
|
|
|
|
if (!record->event.pressed) {
|
2021-08-12 21:56:25 +06:00
|
|
|
SEND_STRING(
|
|
|
|
"qmk flash -kb " QMK_KEYBOARD " -km " QMK_KEYMAP
|
2019-05-23 10:40:16 +06:00
|
|
|
);
|
|
|
|
|
|
|
|
reset_keyboard();
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
2018-05-31 03:49:20 +06:00
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
return process_record_keymap(keycode, record);
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
void tmux_prefix(void) {
|
|
|
|
tap_code16(LCTL(KC_SPC));
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
void tmux_pane_zoom(void) {
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_prefix();
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
SEND_STRING("z");
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
|
|
|
LEADER_EXTERNS();
|
|
|
|
void matrix_scan_user(void) {
|
|
|
|
LEADER_DICTIONARY() {
|
|
|
|
leading = false;
|
|
|
|
leader_end();
|
|
|
|
|
|
|
|
// Available seqs
|
|
|
|
// SEQ_ONE_KEY, SEQ_TWO_KEYS, SEQ_THREE_KEYS
|
|
|
|
// anything you can do in a macro https://docs.qmk.fm/macros.html
|
|
|
|
// https://docs.qmk.fm/feature_leader_key.html
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
// Stop music and lock computer via alfred
|
|
|
|
SEQ_ONE_KEY(KC_H) {
|
|
|
|
SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Stop music and lock computer via alfred
|
|
|
|
SEQ_TWO_KEYS(KC_H, KC_H) {
|
|
|
|
SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER) SS_TAP(X_MEDIA_PLAY_PAUSE));
|
|
|
|
}
|
|
|
|
|
2018-05-31 03:49:20 +06:00
|
|
|
// Whole Screen Shot
|
|
|
|
SEQ_ONE_KEY(KC_A) {
|
2019-05-23 10:40:16 +06:00
|
|
|
SEND_STRING(SS_LGUI(SS_LSFT("3")));
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Selective Screen Shot
|
|
|
|
SEQ_ONE_KEY(KC_S) {
|
2019-05-23 10:40:16 +06:00
|
|
|
SEND_STRING(SS_LGUI(SS_LSFT("4")));
|
2018-05-31 03:49:20 +06:00
|
|
|
}
|
|
|
|
|
|
|
|
// TMUX - shift to pane 1 and zoom
|
|
|
|
SEQ_ONE_KEY(KC_J) {
|
2019-05-23 10:40:16 +06:00
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("q1");
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_pane_zoom();
|
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
// TMUX - shift to first window
|
|
|
|
SEQ_TWO_KEYS(KC_J, KC_J) {
|
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("1");
|
|
|
|
}
|
|
|
|
|
2018-05-31 03:49:20 +06:00
|
|
|
// TMUX - shift to pane 2 and zoom
|
|
|
|
SEQ_ONE_KEY(KC_K) {
|
2019-05-23 10:40:16 +06:00
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("q2");
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_pane_zoom();
|
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
// TMUX - shift to second window
|
|
|
|
SEQ_TWO_KEYS(KC_K, KC_K) {
|
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("2");
|
|
|
|
}
|
|
|
|
|
2018-05-31 03:49:20 +06:00
|
|
|
// TMUX - shift to pane 3 and zoom
|
|
|
|
SEQ_ONE_KEY(KC_L) {
|
2019-05-23 10:40:16 +06:00
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("q3");
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_pane_zoom();
|
|
|
|
}
|
|
|
|
|
2019-05-23 10:40:16 +06:00
|
|
|
// TMUX - shift to third window
|
|
|
|
SEQ_TWO_KEYS(KC_L, KC_L) {
|
|
|
|
tmux_prefix();
|
|
|
|
SEND_STRING("3");
|
|
|
|
}
|
|
|
|
|
2018-05-31 03:49:20 +06:00
|
|
|
// TMUX - shift to last pane and zoom
|
2022-10-13 23:28:14 +06:00
|
|
|
SEQ_ONE_KEY(KC_SEMICOLON) {
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_prefix();
|
2019-05-23 10:40:16 +06:00
|
|
|
SEND_STRING(";");
|
2018-05-31 03:49:20 +06:00
|
|
|
tmux_pane_zoom();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|