Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
d10350cd2c
commit
bbf7a20b33
77 changed files with 2457 additions and 1968 deletions
|
@ -53,81 +53,70 @@ void tmux_pane_zoom(void) {
|
|||
SEND_STRING("z");
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
void leader_end_user(void) {
|
||||
// Stop music and lock computer via alfred
|
||||
if (leader_sequence_one_key(KC_H)) {
|
||||
SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER));
|
||||
}
|
||||
|
||||
// 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
|
||||
// Stop music and lock computer via alfred
|
||||
if (leader_sequence_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));
|
||||
}
|
||||
|
||||
// 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));
|
||||
}
|
||||
// Whole Screen Shot
|
||||
if (leader_sequence_one_key(KC_A)) {
|
||||
SEND_STRING(SS_LGUI(SS_LSFT("3")));
|
||||
}
|
||||
|
||||
// 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));
|
||||
}
|
||||
// Selective Screen Shot
|
||||
if (leader_sequence_one_key(KC_S)) {
|
||||
SEND_STRING(SS_LGUI(SS_LSFT("4")));
|
||||
}
|
||||
|
||||
// Whole Screen Shot
|
||||
SEQ_ONE_KEY(KC_A) {
|
||||
SEND_STRING(SS_LGUI(SS_LSFT("3")));
|
||||
}
|
||||
// TMUX - shift to pane 1 and zoom
|
||||
if (leader_sequence_one_key(KC_J)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q1");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
|
||||
// Selective Screen Shot
|
||||
SEQ_ONE_KEY(KC_S) {
|
||||
SEND_STRING(SS_LGUI(SS_LSFT("4")));
|
||||
}
|
||||
// TMUX - shift to first window
|
||||
if (leader_sequence_two_keys(KC_J, KC_J)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("1");
|
||||
}
|
||||
|
||||
// TMUX - shift to pane 1 and zoom
|
||||
SEQ_ONE_KEY(KC_J) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q1");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
// TMUX - shift to pane 2 and zoom
|
||||
if (leader_sequence_one_key(KC_K)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q2");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
|
||||
// TMUX - shift to first window
|
||||
SEQ_TWO_KEYS(KC_J, KC_J) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("1");
|
||||
}
|
||||
// TMUX - shift to second window
|
||||
if (leader_sequence_two_keys(KC_K, KC_K)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("2");
|
||||
}
|
||||
|
||||
// TMUX - shift to pane 2 and zoom
|
||||
SEQ_ONE_KEY(KC_K) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q2");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
// TMUX - shift to pane 3 and zoom
|
||||
if (leader_sequence_one_key(KC_L)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q3");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
|
||||
// TMUX - shift to second window
|
||||
SEQ_TWO_KEYS(KC_K, KC_K) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("2");
|
||||
}
|
||||
// TMUX - shift to third window
|
||||
if (leader_sequence_two_keys(KC_L, KC_L)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("3");
|
||||
}
|
||||
|
||||
// TMUX - shift to pane 3 and zoom
|
||||
SEQ_ONE_KEY(KC_L) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("q3");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
|
||||
// TMUX - shift to third window
|
||||
SEQ_TWO_KEYS(KC_L, KC_L) {
|
||||
tmux_prefix();
|
||||
SEND_STRING("3");
|
||||
}
|
||||
|
||||
// TMUX - shift to last pane and zoom
|
||||
SEQ_ONE_KEY(KC_SEMICOLON) {
|
||||
tmux_prefix();
|
||||
SEND_STRING(";");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
// TMUX - shift to last pane and zoom
|
||||
if (leader_sequence_one_key(KC_SEMICOLON)) {
|
||||
tmux_prefix();
|
||||
SEND_STRING(";");
|
||||
tmux_pane_zoom();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue