summaryrefslogtreecommitdiff
path: root/users/333fred
diff options
context:
space:
mode:
Diffstat (limited to 'users/333fred')
-rw-r--r--users/333fred/333fred.c144
-rw-r--r--users/333fred/333fred.h51
-rw-r--r--users/333fred/config.h27
-rw-r--r--users/333fred/layout_macros.h66
-rw-r--r--users/333fred/rgb.c50
-rw-r--r--users/333fred/rules.mk10
6 files changed, 0 insertions, 348 deletions
diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c
deleted file mode 100644
index e75a862a3e..0000000000
--- a/users/333fred/333fred.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- Copyright (c) 2020 Fred Silberberg
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-#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(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(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(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_LCTL("v"));
- }
- } else {
- if (is_shift) {
- SEND_STRING(SS_LCTL(SS_TAP(X_INSERT)));
- } else {
- SEND_STRING(SS_LCTL("c"));
- }
- }
-}
-
-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_keycode(uint16_t keycode) {
- if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) {
- tap_dance_active = false;
- }
-}
-
-__attribute__ ((weak))
-void layer_state_set_rgb(layer_state_t state) {}
-
-layer_state_t layer_state_set_user(layer_state_t state) {
- layer_state_set_rgb(state);
- return state;
-}
-
-bool try_handle_macro(uint16_t keycode, keyrecord_t *record) {
- switch (keycode)
- {
- case DLEFT:
- if (record->event.pressed)
- SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_LEFT))));
- return true;
- case DRIGHT:
- if (record->event.pressed)
- SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_RIGHT))));
- return true;
- case PSCREEN_APP:
- if (record->event.pressed)
- SEND_STRING(SS_LALT(SS_TAP(X_PRINT_SCREEN)));
- return true;
-
- default:
- return false;
- }
-}
diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h
deleted file mode 100644
index e8473e7ce1..0000000000
--- a/users/333fred/333fred.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- Copyright (c) 2020 Fred Silberberg
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-#pragma once
-
-#include "quantum.h"
-#include "layout_macros.h"
-
-#define BASE 0
-#define CODEFLOW 1
-#define SYMB 2
-#define MDIA 3 // media keys
-#define VIM 4
-#define GAME 5
-#define GAME_ARROW 6
-
-// Tap dance config shared between my keyboards
-enum tap_dance_declarations {
- TD_SYM_VIM = 0,
- TD_COPY_PASTE,
-};
-
-enum custom_keys {
- DLEFT = SAFE_RANGE,
- DRIGHT,
- PSCREEN_APP
-};
-
-void tap_dance_sym_vim_finished(tap_dance_state_t*, void*);
-void tap_dance_sym_vim_reset(tap_dance_state_t*, void*);
-void tap_dance_process_keycode(uint16_t);
-bool try_handle_macro(uint16_t keycode, keyrecord_t *record);
diff --git a/users/333fred/config.h b/users/333fred/config.h
deleted file mode 100644
index 0bbaa38a99..0000000000
--- a/users/333fred/config.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Copyright (c) 2020 Fred Silberberg
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-#pragma once
-
-#define PERMISSIVE_HOLD
-#define NO_ACTION_MACRO
-#undef ONESHOT_TAP_TOGGLE
diff --git a/users/333fred/layout_macros.h b/users/333fred/layout_macros.h
deleted file mode 100644
index d46a41905e..0000000000
--- a/users/333fred/layout_macros.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Copyright (c) 2020 Fred Silberberg
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-#pragma once
-
-#define SIX_TRNS _______, _______, _______, _______, _______, _______
-#define FOUR_TRNS _______, _______, _______, _______
-
-// Row 5: 6 keys
-#define ROW5_LEFT_BASE KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
-#define ROW5_RGHT_BASE KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS
-#define ROW5_LEFT_SYMB _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
-#define ROW5_RGHT_SYMB KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11
-#define ROW5_LEFT_VIM SIX_TRNS
-#define ROW5_RGHT_VIM SIX_TRNS
-
-// Row 4: 6 keys
-#define ROW4_LEFT_BASE KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
-#define ROW4_RGHT_BASE KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
-#define ROW4_LEFT_SYMB _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE
-#define ROW4_RGHT_SYMB KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12
-#define ROW4_LEFT_VIM SIX_TRNS
-#define ROW4_RGHT_VIM SIX_TRNS
-
-// Row 3: 6 keys
-#define ROW3_LEFT_BASE CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G
-#define ROW3_RGHT_BASE KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
-#define ROW3_LEFT_SYMB _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV
-#define ROW3_RGHT_SYMB KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______
-#define ROW3_LEFT_VIM _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______
-#define ROW3_RGHT_VIM KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______
-
-// Row 2: 6 keys
-#define ROW2_LEFT_BASE OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
-#define ROW2_RGHT_BASE KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT)
-#define ROW2_LEFT_SYMB _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD
-#define ROW2_RGHT_SYMB KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______
-#define ROW2_LEFT_VIM _______, _______, KC_TAB, _______, _______, _______
-#define ROW2_RGHT_VIM SIX_TRNS
-
-// Row 1: 4 keys
-#define ROW1_LEFT_BASE OSM(MOD_LCTL), KC_F4, KC_F5, KC_LALT
-#define ROW1_RGHT_BASE KC_DOWN, KC_EQL, KC_RIGHT, KC_RGUI
-#define ROW1_LEFT_SYMB _______, _______, _______, _______
-#define ROW1_RGHT_SYMB KC_0, KC_DOT, KC_EQL, _______
-#define ROW1_LEFT_VIM FOUR_TRNS
-#define ROW1_RGHT_VIM FOUR_TRNS
diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c
deleted file mode 100644
index ae21702030..0000000000
--- a/users/333fred/rgb.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- Copyright (c) 2020 Fred Silberberg
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-#include "quantum.h"
-#include "333fred.h"
-
-void layer_state_set_rgb(layer_state_t state) {
- switch (get_highest_layer(state)) {
- case BASE:
- // purple
- rgblight_sethsv_noeeprom(210, 255, 20);
- break;
- case SYMB:
- // blue
- rgblight_sethsv_noeeprom(191, 255, 20);
- break;
- case VIM:
- // green
- rgblight_sethsv_noeeprom(85, 255, 20);
- break;
- case GAME:
- // red
- rgblight_sethsv_noeeprom(0, 255, 20);
- break;
- }
-}
-
-void keyboard_post_init_user(void) {
- rgblight_enable_noeeprom();
- layer_state_set_rgb(1); // Set layer 0 (bit 1) on
-}
diff --git a/users/333fred/rules.mk b/users/333fred/rules.mk
deleted file mode 100644
index 265a6c18cb..0000000000
--- a/users/333fred/rules.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC += 333fred.c
-
-ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
- SRC += rgb.c
-endif
-
-TAP_DANCE_ENABLE=yes
-NKRO_ENABLE = yes
-PERMISSIVE_HOLD = yes
-LTO_ENABLE = yes