summaryrefslogtreecommitdiff
path: root/users/kuchosauronad0
diff options
context:
space:
mode:
Diffstat (limited to 'users/kuchosauronad0')
-rw-r--r--users/kuchosauronad0/config.h2
-rw-r--r--users/kuchosauronad0/encoder.c4
-rw-r--r--users/kuchosauronad0/leader.c116
-rw-r--r--users/kuchosauronad0/leader_user.c113
-rw-r--r--users/kuchosauronad0/leader_user.h (renamed from users/kuchosauronad0/leader.h)2
-rw-r--r--users/kuchosauronad0/readme.md4
-rw-r--r--users/kuchosauronad0/rgblight_user.c2
-rw-r--r--users/kuchosauronad0/rules.mk2
-rw-r--r--users/kuchosauronad0/tap_dances.c6
-rw-r--r--users/kuchosauronad0/tap_dances.h2
-rw-r--r--users/kuchosauronad0/unicode.c2
-rw-r--r--users/kuchosauronad0/wrappers.h4
12 files changed, 128 insertions, 131 deletions
diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h
index 9315f879ae..bc0fe67df8 100644
--- a/users/kuchosauronad0/config.h
+++ b/users/kuchosauronad0/config.h
@@ -70,7 +70,7 @@
// actually sends Ctrl-x. That's bad.)
#define IGNORE_MOD_TAP_INTERRUPT
#undef PERMISSIVE_HOLD
-//#define TAPPING_FORCE_HOLD
+//#define QUICK_TAP_TERM 0
//#define RETRO_TAPPING
#ifndef TAPPING_TOGGLE
diff --git a/users/kuchosauronad0/encoder.c b/users/kuchosauronad0/encoder.c
index 9284a041c2..2578ddd873 100644
--- a/users/kuchosauronad0/encoder.c
+++ b/users/kuchosauronad0/encoder.c
@@ -57,8 +57,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
return true;
}
-const uint16_t PROGMEM encoder_actions[][9] = { \
+const uint16_t PROGMEM encoder_actions[][9] = {
// None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER
- { KC_PGDN, KC_DOWN, KC_AUDIO_VOL_UP, KC_END, KC_WWW_FORWARD, KC_AUDIO_MUTE, KC_RIGHT, LSFT(KC_TAB), KC_MEDIA_NEXT_TRACK}, \
+ { KC_PGDN, KC_DOWN, KC_AUDIO_VOL_UP, KC_END, KC_WWW_FORWARD, KC_AUDIO_MUTE, KC_RIGHT, LSFT(KC_TAB), KC_MEDIA_NEXT_TRACK},
{ KC_PGUP, KC_UP, KC_AUDIO_VOL_DOWN, KC_HOME, KC_WWW_BACK, KC_MEDIA_PLAY_PAUSE, KC_LEFT, KC_TAB, KC_MEDIA_PREV_TRACK}
};
diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c
deleted file mode 100644
index ac2a6599a1..0000000000
--- a/users/kuchosauronad0/leader.c
+++ /dev/null
@@ -1,116 +0,0 @@
-#include "leader.h"
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-#endif
-bool leader_succeed;
-
-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
-#ifdef RGBLIGHT_ENABLE
- matrix_scan_rgb();
-#endif
- LEADER_DICTIONARY() {
- leader_succeed = leading = false;
-
- SEQ_ONE_KEY(KC_W) {
- // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command
- SEND_STRING(":w" SS_TAP(X_ENTER));
- tmux_pane_switch_repeat();
- leader_succeed = true;
- } else
- SEQ_ONE_KEY(KC_T) {
- // Send the Tmux Prefix
- tmux_prefix();
- leader_succeed = true;
- } else
- SEQ_ONE_KEY(KC_A) {
- // tmux: Send the prefix and press 'right' arrow
- tmux_prefix();
- tap_code(KC_RIGHT);
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_T, KC_T) {
- // tmux: Send the prefix to a nested session
- tmux_prefix();
- tmux_prefix();
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_T, KC_R) {
- // tmux: Switch pane and repeat last action
- tmux_pane_switch_repeat();
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_V, KC_Z){
- // vim: Zoom pane
- tap_code16(LCTL(KC_W));
- tap_code16(LSFT(KC_BSLS));
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_V, KC_R) {
- // vim: Substitute and place cursor
- SEND_STRING(":%s///g" SS_TAP(X_LEFT));
- tap_code(KC_LEFT);
- tap_code(KC_LEFT);
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_V, KC_T) {
- // vim: move current pane to new tab
- tap_code16(LCTL(KC_W));
- tap_code16(LSFT(KC_T));
- leader_succeed = true;
- } else
- SEQ_ONE_KEY(KC_R){
- // Toggle RGB Layer indicator
- tap_code16(KC_RGB_T);
- leader_succeed = true;
- } else
- SEQ_ONE_KEY(KC_SPC){
- // One Shot Unicode layer
-//TODO tap_code16(OS_UNI);
- leader_succeed = true;
- } else
- SEQ_TWO_KEYS(KC_SPC, KC_SPC){
- // Toggle _MODS
- tap_code16(TG_MODS);
- leader_succeed = true;
- } else
- SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){
- // Reset the keyboard
- reset_keyboard();
- leader_succeed = true;
- }
- leader_end();
- }
-// matrix_scan_keymap();
-}
-
-void leader_start(void) {
-#ifdef RGBLIGHT_ENABLE
- rgblight_savebase();
- rgblight_mode_noeeprom(1);
- rgblight_sethsv_noeeprom(HSV_GOLDENROD);
-#endif
-}
-
-void leader_end(void) {
-// pick color depending of success /fail
-// fade leader_start from 100 to 0
-// fade new color from 0 to 100 to 0
-// fade old color from 0 to 100
-#ifdef RGBLIGHT_ENABLE
- if (leader_succeed) {
- fadeflash_leds(HSV_GREEN);
- } else {
- fadeflash_leds(HSV_RED);
- }
-#endif
-}
diff --git a/users/kuchosauronad0/leader_user.c b/users/kuchosauronad0/leader_user.c
new file mode 100644
index 0000000000..fd356021a6
--- /dev/null
+++ b/users/kuchosauronad0/leader_user.c
@@ -0,0 +1,113 @@
+#include "leader_user.h"
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+#endif
+bool leader_succeed;
+
+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
+#ifdef RGBLIGHT_ENABLE
+ matrix_scan_rgb();
+#endif
+
+// matrix_scan_keymap();
+}
+
+void leader_start_user(void) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_savebase();
+ rgblight_mode_noeeprom(1);
+ rgblight_sethsv_noeeprom(HSV_GOLDENROD);
+#endif
+}
+
+void leader_end_user(void) {
+ leader_succeed = false;
+
+ if (leader_sequence_one_key(KC_W)) {
+ // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command
+ SEND_STRING(":w" SS_TAP(X_ENTER));
+ tmux_pane_switch_repeat();
+ leader_succeed = true;
+ } else
+ if (leader_sequence_one_key(KC_T)) {
+ // Send the Tmux Prefix
+ tmux_prefix();
+ leader_succeed = true;
+ } else
+ if (leader_sequence_one_key(KC_A)) {
+ // tmux: Send the prefix and press 'right' arrow
+ tmux_prefix();
+ tap_code(KC_RIGHT);
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_T, KC_T)) {
+ // tmux: Send the prefix to a nested session
+ tmux_prefix();
+ tmux_prefix();
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_T, KC_R)) {
+ // tmux: Switch pane and repeat last action
+ tmux_pane_switch_repeat();
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_V, KC_Z)){
+ // vim: Zoom pane
+ tap_code16(LCTL(KC_W));
+ tap_code16(LSFT(KC_BSLS));
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_V, KC_R)) {
+ // vim: Substitute and place cursor
+ SEND_STRING(":%s///g" SS_TAP(X_LEFT));
+ tap_code(KC_LEFT);
+ tap_code(KC_LEFT);
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_V, KC_T)) {
+ // vim: move current pane to new tab
+ tap_code16(LCTL(KC_W));
+ tap_code16(LSFT(KC_T));
+ leader_succeed = true;
+ } else
+ if (leader_sequence_one_key(KC_R)){
+ // Toggle RGB Layer indicator
+ tap_code16(KC_RGB_T);
+ leader_succeed = true;
+ } else
+ if (leader_sequence_one_key(KC_SPC)){
+ // One Shot Unicode layer
+//TODO tap_code16(OS_UNI);
+ leader_succeed = true;
+ } else
+ if (leader_sequence_two_keys(KC_SPC, KC_SPC)){
+ // Toggle _MODS
+ tap_code16(TG_MODS);
+ leader_succeed = true;
+ } else
+ if (leader_sequence_three_keys(KC_BSPC, KC_BSPC, KC_BSPC)){
+ // Reset the keyboard
+ reset_keyboard();
+ leader_succeed = true;
+ }
+
+// pick color depending of success /fail
+// fade leader_start from 100 to 0
+// fade new color from 0 to 100 to 0
+// fade old color from 0 to 100
+#ifdef RGBLIGHT_ENABLE
+ if (leader_succeed) {
+ fadeflash_leds(HSV_GREEN);
+ } else {
+ fadeflash_leds(HSV_RED);
+ }
+#endif
+}
diff --git a/users/kuchosauronad0/leader.h b/users/kuchosauronad0/leader_user.h
index ed904f3063..d68dc80c13 100644
--- a/users/kuchosauronad0/leader.h
+++ b/users/kuchosauronad0/leader_user.h
@@ -1,6 +1,6 @@
#pragma once
#include "kuchosauronad0.h"
-#include "leader.h"
+#include "leader_user.h"
void matrix_scan_user(void);
diff --git a/users/kuchosauronad0/readme.md b/users/kuchosauronad0/readme.md
index b577eedb70..88cc4cd374 100644
--- a/users/kuchosauronad0/readme.md
+++ b/users/kuchosauronad0/readme.md
@@ -38,7 +38,7 @@ TODO: Make use of `TD_SPC` and `TD_QT{1..3}`
## [Leader Key](#leader-key)
To enable set `LEADER_ENABLE = yes` in file *rules.mk*
-|LEADER_DICTIONARY()|program| description |
+|Leader sequence|program| description |
|---|---|---|
| W |vim/tmux| save file, switch pane and repeat last command |
| T |tmux| send default prefix |
@@ -50,7 +50,7 @@ To enable set `LEADER_ENABLE = yes` in file *rules.mk*
|V + T|vim | move current split to its own tab|
|3x Backspace|keyboard| Reset Keyboard |
-`LEADER_DICTIONARY()` is defined in *leader.c*
+Leader sequences are defined in *leader_user.c*
## [Combo Keys](#combo-keys)
To enable set `COMBO_ENABLE = yes` in file *rules.mk*.
diff --git a/users/kuchosauronad0/rgblight_user.c b/users/kuchosauronad0/rgblight_user.c
index 77a8ac6df8..1b5c29cfb0 100644
--- a/users/kuchosauronad0/rgblight_user.c
+++ b/users/kuchosauronad0/rgblight_user.c
@@ -145,7 +145,7 @@ void rgblight_fade_helper(bool direction){
void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val){
// indicate success / fail of a leader sequence
// fade out, set new hue and saturation, fade in, fade out, set old color, fade in
- // this is used in leader.c
+ // this is used in leader_user.c
// TODO: come up with a better name maybe
rgblight_fade_helper(false);
rgblight_sethsv_noeeprom(hue, sat, 0);
diff --git a/users/kuchosauronad0/rules.mk b/users/kuchosauronad0/rules.mk
index dfab85703c..a65fe9d258 100644
--- a/users/kuchosauronad0/rules.mk
+++ b/users/kuchosauronad0/rules.mk
@@ -21,7 +21,7 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
endif
ifeq ($(strip $(LEADER_ENABLE)), yes)
- SRC += leader.c
+ SRC += leader_user.c
endif
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
diff --git a/users/kuchosauronad0/tap_dances.c b/users/kuchosauronad0/tap_dances.c
index 7bdd3d3375..40d1c245e3 100644
--- a/users/kuchosauronad0/tap_dances.c
+++ b/users/kuchosauronad0/tap_dances.c
@@ -1,5 +1,5 @@
#include "tap_dances.h"
-void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
+void td_parenthesis (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
// SEND_STRING ("\(");
tap_code(KC_QUOT);
@@ -23,7 +23,7 @@ void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
}
}
-void safe_reset(qk_tap_dance_state_t *state, void *user_data) {
+void safe_reset(tap_dance_state_t *state, void *user_data) {
if (state->count >= 3) {
// Reset the keyboard if you tap the key more than three times
reset_keyboard();
@@ -31,7 +31,7 @@ void safe_reset(qk_tap_dance_state_t *state, void *user_data) {
}
}
-qk_tap_dance_action_t tap_dance_actions[] = {
+tap_dance_action_t tap_dance_actions[] = {
[TD_RESET] = ACTION_TAP_DANCE_FN(safe_reset),
[TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4),
[TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5),
diff --git a/users/kuchosauronad0/tap_dances.h b/users/kuchosauronad0/tap_dances.h
index 19da8d69dc..818bbd7b93 100644
--- a/users/kuchosauronad0/tap_dances.h
+++ b/users/kuchosauronad0/tap_dances.h
@@ -23,4 +23,4 @@ enum {
TD_ABR // single double angle brackets
};
#endif // TAP_DANCE_ENABLE
-void td_parenthesis (qk_tap_dance_state_t *state, void *user_data);
+void td_parenthesis (tap_dance_state_t *state, void *user_data);
diff --git a/users/kuchosauronad0/unicode.c b/users/kuchosauronad0/unicode.c
index 8b312deb66..f0168cef9f 100644
--- a/users/kuchosauronad0/unicode.c
+++ b/users/kuchosauronad0/unicode.c
@@ -1,7 +1,7 @@
#include "unicode.h"
//#ifdef UNICODEMAP_ENABLE
-const uint32_t PROGMEM unicode_map[] = {
+const uint32_t unicode_map[] PROGMEM = {
[BANG] = 0x0203D,// ‽
[IRONY] = 0x02E2E,// ⸮
[DEGREE] = 0x000B0,// °
diff --git a/users/kuchosauronad0/wrappers.h b/users/kuchosauronad0/wrappers.h
index 6dc19d935e..543586e009 100644
--- a/users/kuchosauronad0/wrappers.h
+++ b/users/kuchosauronad0/wrappers.h
@@ -194,11 +194,11 @@ NOTE: These are all the same length. If you do a search/replace
#define _________________ADJUST_R3_________________ _________________MEDIA_RIGHT_______________
#define _________________RGB_UP____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
-#define _________________RGB_CENTER________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM
+#define _________________RGB_CENTER________________ MU_TOGG, CK_TOGG, AU_ON, AU_OFF, AG_NORM
#define _________________RGB_DOWN__________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T
#define _________________RGB_R1____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
-#define _________________RGB_R2____________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM
+#define _________________RGB_R2____________________ MU_TOGG, CK_TOGG, AU_ON, AU_OFF, AG_NORM
#define _________________RGB_R3____________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T
#define __________________GAMEPAD_L1_______________ _______, KC_Q, KC_W, KC_E, _______