summaryrefslogtreecommitdiff
path: root/users/333fred
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-04-09 08:57:19 -0700
committerDrashna Jaelre <drashna@live.com>2019-04-09 08:57:19 -0700
commit6baec0fffdc1e48d228dfc0a73b98a4ecf6d4caf (patch)
treeeff7483e3e82b9dcb249c03ec2bb457e58df04df /users/333fred
parent23a52e40b384199b1146f534aac1c3b83fcaa993 (diff)
Remove Userspace folders
Diffstat (limited to 'users/333fred')
-rw-r--r--users/333fred/333fred.c116
-rw-r--r--users/333fred/333fred.h22
-rw-r--r--users/333fred/333fred_config.h3
-rw-r--r--users/333fred/rgb.c28
-rw-r--r--users/333fred/rules.mk5
5 files changed, 0 insertions, 174 deletions
diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c
deleted file mode 100644
index 3b2b36d020..0000000000
--- a/users/333fred/333fred.c
+++ /dev/null
@@ -1,116 +0,0 @@
-#include "333fred.h"
-#include "quantum.h"
-#include "action.h"
-
-typedef enum {
- SINGLE_TAP, SINGLE_HOLD, DOUBLE
-} tap_dance_state_enum;
-
-static tap_dance_state_enum tap_dance_state;
-static bool tap_dance_active = false;
-
-void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) {
- // Determine the current state
- if (state->count == 1) {
- if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP;
- else tap_dance_state = SINGLE_HOLD;
- } else {
- // Handle any number of other taps as a VIM movement hold
- tap_dance_state = DOUBLE;
- }
-
- switch (tap_dance_state) {
- case SINGLE_TAP:
- if (tap_dance_active) {
- reset_oneshot_layer();
- tap_dance_active = false;
- } else {
- set_oneshot_layer(SYMB, ONESHOT_START);
- tap_dance_active = true;
- }
- break;
- case SINGLE_HOLD:
- layer_on(SYMB);
- break;
- case DOUBLE:
- layer_on(VIM);
- break;
- }
-}
-
-void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) {
- switch(tap_dance_state) {
- case SINGLE_TAP:
- clear_oneshot_layer_state(ONESHOT_PRESSED);
- break;
- case SINGLE_HOLD:
- layer_off(SYMB);
- break;
- case DOUBLE:
- layer_off(VIM);
- break;
- }
-}
-
-void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) {
- bool is_paste = state->count == 2;
- // If either the one-shot shift is set, or if shift is being held, count as shift being held.
- // We'll clear the one-shot shift if it was held
- uint8_t one_shot_mods = get_oneshot_mods();
- bool is_shift = false;
-
- if (get_mods() & MOD_MASK_SHIFT) {
- is_shift = true;
- } else if (one_shot_mods & MOD_MASK_SHIFT) {
- set_oneshot_mods(one_shot_mods & ~MOD_MASK_SHIFT);
- is_shift = true;
- }
-
- if (is_paste) {
- if (is_shift) {
- SEND_STRING(SS_LSFT(SS_TAP(X_INSERT)));
- } else {
- SEND_STRING(SS_LCTRL("v"));
- }
- } else {
- if (is_shift) {
- SEND_STRING(SS_LCTRL(SS_TAP(X_INSERT)));
- } else {
- SEND_STRING(SS_LCTRL("c"));
- }
- }
-}
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset),
- [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL)
-};
-
-void tap_dance_process_record(uint16_t keycode) {
- if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) {
- tap_dance_active = false;
- }
-}
-
-__attribute__ ((weak))
-void matrix_init_rgb(void) {}
-
-__attribute__ ((weak))
-void layer_state_set_rgb(uint32_t state) {}
-
-__attribute__ ((weak))
-void matrix_scan_user_keyboard(void) {}
-
-void matrix_scan_user() {
- static bool first_run = true;
- if (first_run) {
- first_run = false;
- matrix_init_rgb();
- }
- matrix_scan_user_keyboard();
-}
-
-uint32_t layer_state_set_user(uint32_t state) {
- layer_state_set_rgb(state);
- return state;
-}
diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h
deleted file mode 100644
index 0e6c6a196f..0000000000
--- a/users/333fred/333fred.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#pragma once
-
-#include "quantum.h"
-
-#define BASE 0
-#define CODE 1 // code layer
-#define CODEFLOW 2
-#define SYMB 3
-#define MDIA 4 // media keys
-#define VIM 5
-#define GAME 6
-#define GAME_ARROW 7
-
-// Tap dance config shared between my keyboards
-enum tap_dance_declarations {
- TD_SYM_VIM = 0,
- TD_COPY_PASTE,
-};
-
-void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*);
-void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*);
-void tap_dance_process_record(uint16_t);
diff --git a/users/333fred/333fred_config.h b/users/333fred/333fred_config.h
deleted file mode 100644
index b158e2d5a2..0000000000
--- a/users/333fred/333fred_config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define PERMISSIVE_HOLD
diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c
deleted file mode 100644
index a3dfd905cc..0000000000
--- a/users/333fred/rgb.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "quantum.h"
-#include "333fred.h"
-
-void matrix_init_rgb(void) {
- rgblight_enable_noeeprom();
- rgblight_sethsv_noeeprom(270, 255, 20);
-}
-
-void layer_state_set_rgb(uint32_t state) {
- switch (biton32(state)) {
- case BASE:
- // purple
- rgblight_sethsv_noeeprom(270, 255, 20);
- break;
- case SYMB:
- // blue
- rgblight_sethsv_noeeprom(240, 255, 20);
- break;
- case VIM:
- // green
- rgblight_sethsv_noeeprom(120, 255, 20);
- break;
- case GAME:
- // red
- rgblight_sethsv_noeeprom(0, 255, 20);
- break;
- }
-}
diff --git a/users/333fred/rules.mk b/users/333fred/rules.mk
deleted file mode 100644
index 0e2cc2588c..0000000000
--- a/users/333fred/rules.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-SRC += 333fred.c
-
-ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
- SRC += rgb.c
-endif