From 7be7f41e0215bc14bdf133c35d027491b2707157 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 7 Oct 2020 19:58:18 -0400 Subject: [PATCH] more --- moonlander/keymap.c | 4 ++-- moonlander/leader.c | 35 +++++++++++++++++++++++++++-------- moonlander/rules.mk | 3 ++- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/moonlander/keymap.c b/moonlander/keymap.c index 0e53940..f0aeb7d 100644 --- a/moonlander/keymap.c +++ b/moonlander/keymap.c @@ -2,8 +2,8 @@ #include "config.h" #include "version.h" #include "keymap_steno.h" -#include "g/keymap_combo.h" #include "music.h" +#include "g/keymap_combo.h" #define KC_MAC_UNDO LGUI(KC_Z) #define KC_MAC_CUT LGUI(KC_X) @@ -433,7 +433,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case PRINT_WPM: if (record->event.pressed) { - //send_string("Current WPM: %d\n", get_current_wpm()); + //SEND_STRING(sprintf("Current WPM: %d\n", get_current_wpm())); } return false; } diff --git a/moonlander/leader.c b/moonlander/leader.c index 154ec4f..c20fce8 100644 --- a/moonlander/leader.c +++ b/moonlander/leader.c @@ -30,11 +30,11 @@ void matrix_scan_user(void) { SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { autoshift_disable(); } // Go - SEQ_THREE_KEYS(KC_G, KC_I, KC_E) { SEND_STRING("if err != nil {\n\t\n}"); } - SEQ_TWO_KEYS(KC_G, KC_B) { SEND_STRING("go build\n"); } - SEQ_THREE_KEYS(KC_G, KC_B, KC_A) { SEND_STRING("go build ./...\n"); } - SEQ_TWO_KEYS(KC_G, KC_T) { SEND_STRING("go test\n"); } - SEQ_THREE_KEYS(KC_G, KC_T, KC_A) { SEND_STRING("go test ./...\n"); } + 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)); } // dwm /// layouts @@ -70,6 +70,8 @@ void matrix_scan_user(void) { 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 "); } + 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 "); } SEQ_TWO_KEYS(KC_K, KC_N) { SEND_STRING("kubens "); } SEQ_TWO_KEYS(KC_K, KC_C) { SEND_STRING("kubectx "); } @@ -86,15 +88,32 @@ void matrix_scan_user(void) { SEQ_TWO_KEYS(KC_G, KC_O) { SEND_STRING("git checkout"); } 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"); } - SEQ_TWO_KEYS(KC_G, KC_C) { SEND_STRING("git commit -m ''"); } - SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { SEND_STRING("git commit --amend"); } + 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) { - 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."); + 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"); } + + // 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 "); } } } diff --git a/moonlander/rules.mk b/moonlander/rules.mk index b87832b..c5f4b32 100644 --- a/moonlander/rules.mk +++ b/moonlander/rules.mk @@ -4,7 +4,7 @@ COMMAND_ENABLE = no WEBUSB_ENABLE = yes ORYX_ENABLE = yes DYNAMIC_MACRO_ENABLE = yes -SRC = matrix.c leader.c +SRC = matrix.c RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes COMBO_ENABLE = yes @@ -13,3 +13,4 @@ WPM_ENABLE = yes STENO_ENABLE = yes AUTO_SHIFT_ENABLE = yes LEADER_ENABLE = yes +USER_NAME := kadis