From 08e111758d1828f206a75f2083fc026a494365b5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 20 Oct 2022 23:15:15 +0100 Subject: Remove stale userspace/keymaps (#18700) --- users/pcoves/.gitignore | 2 - users/pcoves/combo.c | 44 --------------- users/pcoves/config.h | 2 - users/pcoves/pcoves.c | 44 --------------- users/pcoves/pcoves.h | 32 ----------- users/pcoves/rainbowUnicorn.c | 42 -------------- users/pcoves/rainbowUnicorn.h | 5 -- users/pcoves/readme.md | 14 ----- users/pcoves/rules.mk | 30 ---------- users/pcoves/tapDance.c | 127 ------------------------------------------ users/pcoves/tapDance.h | 8 --- users/pcoves/unicode.c | 20 ------- users/pcoves/unicode.h | 5 -- 13 files changed, 375 deletions(-) delete mode 100644 users/pcoves/.gitignore delete mode 100644 users/pcoves/combo.c delete mode 100644 users/pcoves/config.h delete mode 100644 users/pcoves/pcoves.c delete mode 100644 users/pcoves/pcoves.h delete mode 100644 users/pcoves/rainbowUnicorn.c delete mode 100644 users/pcoves/rainbowUnicorn.h delete mode 100644 users/pcoves/readme.md delete mode 100644 users/pcoves/rules.mk delete mode 100644 users/pcoves/tapDance.c delete mode 100644 users/pcoves/tapDance.h delete mode 100644 users/pcoves/unicode.c delete mode 100644 users/pcoves/unicode.h (limited to 'users/pcoves') diff --git a/users/pcoves/.gitignore b/users/pcoves/.gitignore deleted file mode 100644 index c0579ed329..0000000000 --- a/users/pcoves/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -secret.h -secret.c diff --git a/users/pcoves/combo.c b/users/pcoves/combo.c deleted file mode 100644 index a9a1ffe988..0000000000 --- a/users/pcoves/combo.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "quantum.h" - -enum { - MIN, - EQL, - - ESC, - BSP, - DEL, - - TAB, - BSL, - - CUT, - GRA, -}; - -const uint16_t PROGMEM min[] = {KC_C, KC_V, COMBO_END}; -const uint16_t PROGMEM eql[] = {KC_M, KC_COMM, COMBO_END}; - -const uint16_t PROGMEM esc[] = {KC_D, KC_F, COMBO_END}; -const uint16_t PROGMEM bsp[] = {KC_J, KC_K, COMBO_END}; -const uint16_t PROGMEM del[] = {KC_DOWN, KC_UP, COMBO_END}; - -const uint16_t PROGMEM tab[] = {KC_S, KC_F, COMBO_END}; -const uint16_t PROGMEM bsl[] = {KC_J, KC_L, COMBO_END}; - -const uint16_t PROGMEM cut[] = {KC_K, KC_L, COMBO_END}; -const uint16_t PROGMEM gra[] = {KC_S, KC_D, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - [MIN] = COMBO(min, KC_MINS), - [EQL] = COMBO(eql, KC_EQL), - - [ESC] = COMBO(esc, KC_ESC), - [BSP] = COMBO(bsp, KC_BSPC), - [DEL] = COMBO(del, KC_DEL), - - [TAB] = COMBO(tab, KC_TAB), - [BSL] = COMBO(bsl, KC_BSLS), - - [CUT] = COMBO(cut, KC_QUOT), - [GRA] = COMBO(gra, KC_GRAVE), -}; diff --git a/users/pcoves/config.h b/users/pcoves/config.h deleted file mode 100644 index 645dcbbf4c..0000000000 --- a/users/pcoves/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#define COMBO_TERM 200 -#define COMBO_COUNT 9 diff --git a/users/pcoves/pcoves.c b/users/pcoves/pcoves.c deleted file mode 100644 index af5b987a6f..0000000000 --- a/users/pcoves/pcoves.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "pcoves.h" - -#ifdef RAINBOW_UNICORN_ENABLE -#include "rainbowUnicorn.h" -#endif - -#ifdef UNICODE_ENABLE -#include "unicode.h" -#endif - -#if SECRET_ENABLE -#include "secret.h" -#endif - -__attribute__((weak)) void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { -#ifdef UNICODE_ENABLE - set_unicode_input_mode(UC_LNX); -#endif - eeconfig_init_keymap(); -} - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case AUTRUCHE: - if (record->event.pressed) SEND_STRING("Autruche"); - return true; - } - - return process_record_keymap(keycode, record) -#ifdef RAINBOW_UNICORN_ENABLE - && process_record_rainbowUnicorn(keycode, record) -#endif -#ifdef UNICODE_ENABLE - && process_record_unicode(keycode, record) -#endif -#if SECRET_ENABLE - && process_record_secret(keycode, record) -#endif - ; -} diff --git a/users/pcoves/pcoves.h b/users/pcoves/pcoves.h deleted file mode 100644 index 10dfc56bd3..0000000000 --- a/users/pcoves/pcoves.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define SECRET_ENABLE (__has_include("secret.h") && !defined(NO_SECRET)) - -enum { - AUTRUCHE = SAFE_RANGE, -#ifdef RAINBOW_UNICORN_ENABLE - RAINBOW_UNICORN_TOGGLE, -#endif -#ifdef UNICODE_ENABLE - EMOTE0, - EMOTE1, - EMOTE2, - EMOTE3, -#endif -#if SECRET_ENABLE - SECRET0, - SECRET1, - SECRET2, - SECRET3, - SECRET4, -#endif - PCOVES_SAFE_RANGE, -}; - -__attribute__((weak)) void eeconfig_init_keymap(void); -void eeconfig_init_user(void); - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/users/pcoves/rainbowUnicorn.c b/users/pcoves/rainbowUnicorn.c deleted file mode 100644 index 9520415051..0000000000 --- a/users/pcoves/rainbowUnicorn.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "rainbowUnicorn.h" -#include "pcoves.h" - -static struct { - bool enabled; - uint8_t color; - char string[2]; - uint8_t mods; -} state = {false, 0}; - -bool process_record_rainbowUnicorn(uint16_t keycode, keyrecord_t* record) { - if (keycode == RAINBOW_UNICORN_TOGGLE) { - state.enabled ^= true; - return false; - } - - if (!state.enabled) return true; - - switch (keycode) { - case KC_A ... KC_Z: - case KC_1 ... KC_0: - case ALT_T(KC_A)... ALT_T(KC_Z): - case CTL_T(KC_A)... CTL_T(KC_Z): - case GUI_T(KC_A)... GUI_T(KC_Z): - case SFT_T(KC_A)... SFT_T(KC_Z): - if (record->event.pressed) { - state.mods = get_mods(); - clear_mods(); - - tap_code16(C(KC_C)); - - itoa(state.color + 3, state.string, 10); - send_string(state.string); - - set_mods(state.mods); - } else { - state.color = (state.color + 1) % 11; - } - } - - return true; -} diff --git a/users/pcoves/rainbowUnicorn.h b/users/pcoves/rainbowUnicorn.h deleted file mode 100644 index 0c709b4b7a..0000000000 --- a/users/pcoves/rainbowUnicorn.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" - -__attribute__((weak)) bool process_record_rainbowUnicorn(uint16_t keycode, keyrecord_t* keyrecord); diff --git a/users/pcoves/readme.md b/users/pcoves/readme.md deleted file mode 100644 index 1d076d92f6..0000000000 --- a/users/pcoves/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2020 @pcoves - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/users/pcoves/rules.mk b/users/pcoves/rules.mk deleted file mode 100644 index 400497b151..0000000000 --- a/users/pcoves/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -SRC += pcoves.c - -RAINBOW_UNICORN_ENABLE ?= no -ifneq ($(strip $(RAINBOW_UNICORN_ENABLE)), no) - SRC += rainbowUnicorn.c - OPT_DEFS += -DRAINBOW_UNICORN_ENABLE -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tapDance.c -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += combo.c -endif - -ifeq ($(strip $(UNICODE_ENABLE)), yes) - SRC += unicode.c - OPT_DEFS += -DUNICODE_ENABLE -endif - -ifneq ($(strip $(NO_SECRET)), yes) - ifneq ("$(wildcard $(USER_PATH)/secret.c)","") - SRC += secret.c - else - OPT_DEFS += -DNO_SECRET - endif -else - OPT_DEFS += -DNO_SECRET -endif diff --git a/users/pcoves/tapDance.c b/users/pcoves/tapDance.c deleted file mode 100644 index 05b451f02e..0000000000 --- a/users/pcoves/tapDance.c +++ /dev/null @@ -1,127 +0,0 @@ -#include "tapDance.h" - -#include "quantum.h" - -void left(qk_tap_dance_state_t* state, void* user_data) { - switch (state->count) { - case 1: - if (state->pressed) - tap_code16(S(KC_LEFT_BRACKET)); - else - tap_code16(S(KC_9)); - break; - case 2: - if (state->pressed) - tap_code16(S(KC_COMM)); - else - tap_code(KC_LEFT_BRACKET); - break; - default: - reset_tap_dance(state); - } -} - -void right(qk_tap_dance_state_t* state, void* user_data) { - switch (state->count) { - case 1: - if (state->pressed) - tap_code16(S(KC_RIGHT_BRACKET)); - else - tap_code16(S(KC_0)); - break; - case 2: - if (state->pressed) - tap_code16(S(KC_DOT)); - else - tap_code(KC_RIGHT_BRACKET); - break; - default: - reset_tap_dance(state); - } -} - -enum { REST, HOLD1, HOLD2, HOLD3 }; - -static int Alt = REST; -void altFinish(qk_tap_dance_state_t* state, void* user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - register_code(KC_LALT); - Alt = HOLD1; - } - break; - case 2: - if (state->pressed) { - register_code(KC_RALT); - Alt = HOLD2; - } - break; - case 3: - if (state->pressed) { - register_code(KC_RALT); - register_code(KC_RSFT); - Alt = HOLD3; - } - break; - default: - reset_tap_dance(state); - } -} - -void altReset(qk_tap_dance_state_t* state, void* user_data) { - switch (Alt) { - case HOLD1: - unregister_code(KC_LALT); - break; - case HOLD2: - unregister_code(KC_RALT); - break; - case HOLD3: - unregister_code(KC_RSFT); - unregister_code(KC_RALT); - break; - } - Alt = REST; -} - -static int Ctrl = REST; -void ctrlFinish(qk_tap_dance_state_t* state, void* user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - register_code(KC_LCTL); - Ctrl = HOLD1; - } else { - tap_code(KC_ESC); - } - break; - case 2: - if (state->pressed) { - register_code(KC_LGUI); - Ctrl = HOLD2; - } - break; - default: - reset_tap_dance(state); - } -} - -void ctrlReset(qk_tap_dance_state_t* state, void* user_data) { - switch (Ctrl) { - case HOLD1: - unregister_code(KC_LCTL); - break; - case HOLD2: - unregister_code(KC_LGUI); - break; - } - Ctrl = REST; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [ALT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altFinish, altReset), - [CTRL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlFinish, ctrlReset), - [LEFT] = ACTION_TAP_DANCE_FN(left), - [RIGHT] = ACTION_TAP_DANCE_FN(right), -}; diff --git a/users/pcoves/tapDance.h b/users/pcoves/tapDance.h deleted file mode 100644 index 98fd8ae2c7..0000000000 --- a/users/pcoves/tapDance.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -enum { - ALT, - CTRL, - LEFT, - RIGHT, -}; diff --git a/users/pcoves/unicode.c b/users/pcoves/unicode.c deleted file mode 100644 index 966a9d3852..0000000000 --- a/users/pcoves/unicode.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "unicode.h" -#include "pcoves.h" - -bool process_record_unicode(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case EMOTE0: - if (record->event.pressed) send_unicode_string("(╯°□°)╯︵┻━┻"); - return false; - case EMOTE1: - if (record->event.pressed) send_unicode_string("(ヘ・_・)ヘ┳━┳"); - return false; - case EMOTE2: - if (record->event.pressed) send_unicode_string("¯\\_(ツ)_/¯"); - return false; - case EMOTE3: - if (record->event.pressed) send_unicode_string("ಠ_ಠ"); - return false; - } - return true; -} diff --git a/users/pcoves/unicode.h b/users/pcoves/unicode.h deleted file mode 100644 index ba8a881787..0000000000 --- a/users/pcoves/unicode.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" - -__attribute__((weak)) bool process_record_unicode(uint16_t keycode, keyrecord_t *record); -- cgit v1.2.3