aboutsummaryrefslogtreecommitdiffstats
path: root/users/kuchosauronad0/leader.c
diff options
context:
space:
mode:
authorkuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com>2019-08-17 08:19:35 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-08-17 08:19:35 -0700
commit683605a9dc285c5e8f6328ec81a29505892287b7 (patch)
tree82254e30a4aa0c0774aec22a6c7f69a1045b83d0 /users/kuchosauronad0/leader.c
parentc178bbf2e50424ee54fbd3a43609089470129c34 (diff)
downloadfirmware-683605a9dc285c5e8f6328ec81a29505892287b7.tar.gz
firmware-683605a9dc285c5e8f6328ec81a29505892287b7.tar.bz2
firmware-683605a9dc285c5e8f6328ec81a29505892287b7.zip
Userspace kuchosauronad0 (#6541)
* initial commit * Update layout. Tweak rules.mk * initial userspace configuration for kuchosauronad0 * modified userspace for kuchosauronad0 * added OSL_UNI * clean up * clean up * style * style * added more unicode * fixed representation * fixed representation * added comments * added comments, restructure * accidently one line * restructure * restructure * added git_lazy(void) * fixed indenting and added missing symbols * fixed indent * fixed indent * update * change tapping_term to 150 * added UNICODEMAP_ENABLE block * replace register with tap_code where possible * formatting * rearrange sequences * clean up * clean up * added unicode layer * disabled tap dance * add files for encoder * removed unnecessary include * removed unnecessary stuff
Diffstat (limited to 'users/kuchosauronad0/leader.c')
-rw-r--r--users/kuchosauronad0/leader.c84
1 files changed, 84 insertions, 0 deletions
diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c
new file mode 100644
index 000000000..611b70074
--- /dev/null
+++ b/users/kuchosauronad0/leader.c
@@ -0,0 +1,84 @@
+#include "leader.h"
+
+LEADER_EXTERNS();
+
+void matrix_scan_user(void){
+ static bool has_ran_yet;
+ if (!has_ran_yet) {
+ has_ran_yet = true;
+ startup_user();
+ }
+
+#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
+// run_diablo_macro_check();
+#endif // TAP_DANCE_ENABLE
+
+#ifdef RGBLIGHT_ENABLE
+ matrix_scan_rgb();
+#endif // RGBLIGHT_ENABLE
+
+ LEADER_DICTIONARY() {
+ leading = false;
+ leader_end();
+ // Q is for TMUX
+ // Z is for OS related things
+ // other single key sequences are mostly for terminals and vim
+
+ SEQ_ONE_KEY(KC_W) {
+ // Vim + Tmux Macro, when in command mode in vim: write to file, change to the other pane in the current session and repeat the last command
+ SEND_STRING(":w" SS_TAP(X_ENTER));
+ tmux_pane_switch_repeat();
+ }
+
+ SEQ_ONE_KEY(KC_T) {
+ // Send the Tmux Prefix
+ tmux_prefix();
+ }
+
+ SEQ_ONE_KEY(KC_A) {
+ // Send the Tmux Prefix and press 'right' arrow
+ tmux_prefix();
+ tap_code(KC_RIGHT);
+ }
+
+ SEQ_TWO_KEYS(KC_T, KC_T) {
+ // Send the Tmux Prefix to a nested session
+ tmux_prefix();
+ tmux_prefix();
+ }
+ SEQ_TWO_KEYS(KC_Q, KC_A) {
+ // Switch pane and repeat last action
+ tmux_pane_switch_repeat();
+ }
+
+ SEQ_TWO_KEYS(KC_Z, KC_P){
+ // Press windows key, send string 'plex' and press enter
+ register_code(KC_LGUI);
+ register_code(KC_S);
+ unregister_code(KC_S);
+
+ unregister_code(KC_LGUI);
+ SEND_STRING("plex");
+ tap_code(KC_ENTER);
+ }
+
+ SEQ_TWO_KEYS(KC_Z, KC_F) {
+ // Open a search
+ register_code(KC_LGUI);
+ register_code(KC_S);
+ unregister_code(KC_S);
+ unregister_code(KC_LGUI);
+ }
+
+ SEQ_TWO_KEYS(KC_Z, KC_Z) {
+ SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER));
+ }
+
+ SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){
+ // Reset the keyboard
+ reset_keyboard();
+ }
+ }
+
+ matrix_scan_keymap();
+}