My keyboard layout C code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
6.5 KiB

#include QMK_KEYBOARD_H
#include "config.h"
#include "version.h"
extern void combo_enable(void);
extern void combo_disable(void);
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
// Proxytags
SEQ_TWO_KEYS(KC_P, KC_C) { SEND_STRING("Cadey\\ "); }
SEQ_TWO_KEYS(KC_P, KC_N) { SEND_STRING("Nicole\\ "); }
SEQ_TWO_KEYS(KC_P, KC_J) { SEND_STRING("Jessie\\ "); }
SEQ_TWO_KEYS(KC_P, KC_A) { SEND_STRING("Ashe\\ "); }
SEQ_TWO_KEYS(KC_P, KC_S) { SEND_STRING("Sephie\\ "); }
SEQ_TWO_KEYS(KC_P, KC_M) { SEND_STRING("Mai\\ "); }
// Combos
SEQ_TWO_KEYS(KC_C, KC_D) { combo_disable(); }
SEQ_TWO_KEYS(KC_C, KC_E) { combo_enable(); }
// Autoshift
SEQ_THREE_KEYS(KC_A, KC_S, KC_T) { autoshift_toggle(); }
SEQ_THREE_KEYS(KC_A, KC_S, KC_E) { autoshift_enable(); }
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { autoshift_disable(); }
// Go
2 years ago
SEQ_THREE_KEYS(KC_G, KC_I, KC_E) { SEND_STRING("if err != nil {\n\t\n}" SS_TAP(X_UP)); }
SEQ_TWO_KEYS(KC_G, KC_B) { SEND_STRING("go build" SS_TAP(X_ENTER)); }
SEQ_THREE_KEYS(KC_G, KC_B, KC_A) { SEND_STRING("go build ./..." SS_TAP(X_ENTER)); }
SEQ_TWO_KEYS(KC_G, KC_T) { SEND_STRING("go test" SS_TAP(X_ENTER)); }
SEQ_THREE_KEYS(KC_G, KC_T, KC_A) { SEND_STRING("go test ./..." SS_TAP(X_ENTER)); }
2 years ago
// dwm
/// layouts
SEQ_THREE_KEYS(KC_D, KC_L, KC_F) { SEND_STRING(SS_LALT(SS_TAP(X_F))); }
SEQ_THREE_KEYS(KC_D, KC_L, KC_T) { SEND_STRING(SS_LALT(SS_TAP(X_T))); }
SEQ_THREE_KEYS(KC_D, KC_L, KC_M) { SEND_STRING(SS_LALT(SS_TAP(X_M))); }
SEQ_THREE_KEYS(KC_D, KC_L, KC_B) { SEND_STRING(SS_LALT(SS_TAP(X_U))); }
SEQ_THREE_KEYS(KC_D, KC_L, KC_O) { SEND_STRING(SS_LALT(SS_TAP(X_O))); }
/// spawn
SEQ_THREE_KEYS(KC_D, KC_S, KC_E) { SEND_STRING(SS_LALT(SS_TAP(X_E))); }
SEQ_THREE_KEYS(KC_D, KC_S, KC_T) { SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_ENTER)))); }
SEQ_TWO_KEYS(KC_D, KC_S) { SEND_STRING(SS_LALT(SS_TAP(X_P))); }
/// window management
SEQ_TWO_KEYS(KC_D, KC_C) { SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_C)))); }
SEQ_TWO_KEYS(KC_D, KC_ENTER) { SEND_STRING(SS_LALT(SS_TAP(X_ENTER))); }
/// dwm meta
SEQ_THREE_KEYS(KC_D, KC_Q, KC_L) { SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_Q)))); }
// Nix
SEQ_TWO_KEYS(KC_N, KC_B) { SEND_STRING("nix-build"); }
SEQ_THREE_KEYS(KC_N, KC_B, KC_D) { SEND_STRING("nix-build docker.nix"); }
SEQ_THREE_KEYS(KC_N, KC_O, KC_R) { SEND_STRING("sudo nixos-rebuild switch"); }
SEQ_THREE_KEYS(KC_N, KC_O, KC_U) { SEND_STRING("sudo nixos-rebuild switch --upgrade"); }
SEQ_THREE_KEYS(KC_N, KC_N, KC_P) { SEND_STRING("lorri init; niv init; niv update nixpkgs -b nixpkgs-unstable"); }
// k8s
SEQ_THREE_KEYS(KC_K, KC_G, KC_D) { SEND_STRING("kubectl get deployments "); }
SEQ_THREE_KEYS(KC_K, KC_G, KC_P) { SEND_STRING("kubectl get pods "); }
2 years ago
SEQ_THREE_KEYS(KC_K, KC_G, KC_S) { SEND_STRING("kubectl get service "); }
SEQ_THREE_KEYS(KC_K, KC_G, KC_I) { SEND_STRING("kubectl get ingress "); }
SEQ_THREE_KEYS(KC_K, KC_G, KC_N) { SEND_STRING("kubectl get nodes -o wide "); }
SEQ_TWO_KEYS(KC_K, KC_L) { SEND_STRING("kubectl logs "); }
SEQ_THREE_KEYS(KC_K, KC_L, KC_D) { SEND_STRING("kubectl logs deployment/"); }
SEQ_TWO_KEYS(KC_K, KC_V) { SEND_STRING("kubectl version "); }
SEQ_TWO_KEYS(KC_K, KC_I) { SEND_STRING("kubectl exec -it "); }
2 years ago
SEQ_TWO_KEYS(KC_K, KC_E) { SEND_STRING("kubectl edit "); }
SEQ_THREE_KEYS(KC_K, KC_E, KC_D) { SEND_STRING("kubectl edit deployment/"); }
SEQ_TWO_KEYS(KC_K, KC_D) { SEND_STRING("kubectl describe "); }
2 years ago
SEQ_TWO_KEYS(KC_K, KC_N) { SEND_STRING("kubens "); }
SEQ_TWO_KEYS(KC_K, KC_C) { SEND_STRING("kubectx "); }
// Git
SEQ_TWO_KEYS(KC_G, KC_P) { SEND_STRING("git push"); }
SEQ_THREE_KEYS(KC_G, KC_F, KC_P) { SEND_STRING("git push --force-with-lease"); }
SEQ_TWO_KEYS(KC_G, KC_U) { SEND_STRING("git pull"); }
SEQ_TWO_KEYS(KC_G, KC_A) { SEND_STRING("git add ."); }
SEQ_TWO_KEYS(KC_G, KC_D) { SEND_STRING("git diff"); }
SEQ_THREE_KEYS(KC_G, KC_D, KC_S) { SEND_STRING("git diff --staged"); }
SEQ_TWO_KEYS(KC_G, KC_L) { SEND_STRING("git log"); }
SEQ_THREE_KEYS(KC_G, KC_L, KC_O) { SEND_STRING("git log --oneline"); }
SEQ_TWO_KEYS(KC_G, KC_O) { SEND_STRING("git checkout"); }
2 years ago
SEQ_THREE_KEYS(KC_G, KC_O, KC_B) { SEND_STRING("git checkout -b "); }
SEQ_TWO_KEYS(KC_G, KC_S) { SEND_STRING("git status"); }
2 years ago
SEQ_TWO_KEYS(KC_G, KC_C) { SEND_STRING("git commit -m ''" SS_TAP(X_LEFT)); }
SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { SEND_STRING("git commit --amend -m ''" SS_TAP(X_LEFT)); }
// emacs
SEQ_TWO_KEYS(KC_E, KC_X) { SEND_STRING(SS_LALT(SS_TAP(X_X))); }
SEQ_TWO_KEYS(KC_E, KC_B) { SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_B) SS_TAP(X_B)); }
SEQ_TWO_KEYS(KC_E, KC_F) { SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_F) SS_TAP(X_F)); }
// copypastas
SEQ_THREE_KEYS(KC_P, KC_N, KC_B) {
2 years ago
SEND_STRING("Non-binary gender identity is just one term used to describe individuals who may experience a gender identity that is neither exclusively male or female or is in between or beyond both genders. Non-binary individuals may identify as gender fluid, agender (without gender), third gender, or something else entirely. For more information see https://nonbinary.wiki/wiki/Frequently_Asked_Questions.");
}
SEQ_THREE_KEYS(KC_P, KC_B, KC_M) {
SEND_STRING("this sentence makes you breathe manually");
}
2 years ago
// systemctl
SEQ_TWO_KEYS(KC_S, KC_R) { SEND_STRING("systemctl restart "); }
SEQ_THREE_KEYS(KC_S, KC_U, KC_R) { SEND_STRING("systemctl --user restart "); }
SEQ_TWO_KEYS(KC_S, KC_E) { SEND_STRING("systemctl enable "); }
SEQ_THREE_KEYS(KC_S, KC_U, KC_E) { SEND_STRING("systemctl --user enable "); }
SEQ_TWO_KEYS(KC_S, KC_D) { SEND_STRING("systemctl disable "); }
SEQ_THREE_KEYS(KC_S, KC_U, KC_D) { SEND_STRING("systemctl --user disable "); }
SEQ_TWO_KEYS(KC_S, KC_S) { SEND_STRING("systemctl stop "); }
SEQ_THREE_KEYS(KC_S, KC_U, KC_S) { SEND_STRING("systemctl --user stop "); }
SEQ_TWO_KEYS(KC_S, KC_K) { SEND_STRING("systemctl kill "); }
SEQ_THREE_KEYS(KC_S, KC_U, KC_K) { SEND_STRING("systemctl --user kill "); }
}
}