diff --git a/.clangd b/.clangd index 63dadd7..2be2d81 100644 --- a/.clangd +++ b/.clangd @@ -1,4 +1,4 @@ CompileFlags: Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option] - Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues, -D__has_include*] + Remove: [-W*, -mcall-prologues] Compiler: clang diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 7aaee1f..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,33 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "QMK CLI", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "ghcr.io/qmk/qmk_cli", - "customizations": { - "vscode": { - "extensions": [ - "amodio.toggle-excluded-files", - "EditorConfig.EditorConfig", - "xaver.clang-format", - "llvm-vs-code-extensions.vscode-clangd", - "bierner.github-markdown-preview", - "donjayamanne.git-extension-pack", - "ms-vscode-remote.remote-containers" - ] - } - }, - "postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/setup.sh ${containerWorkspaceFolder}" - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh deleted file mode 100755 index 9155c6c..0000000 --- a/.devcontainer/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -eEuo pipefail - -wget https://bootstrap.pypa.io/get-pip.py -python3 get-pip.py -python3 -m pip install qmk -rm get-pip.py - -python3 -m pip install --upgrade milc - -userspacePath="$1" - -git config --global --add safe.directory "$userspacePath" -git submodule update --init --recursive - -[ -d /workspaces/qmk_firmware ] || git clone https://github.com/qmk/qmk_firmware.git /workspaces/qmk_firmware -git config --global --add safe.directory /workspaces/qmk_firmware - -qmk config user.qmk_home=/workspaces/qmk_firmware -qmk config user.overlay_dir="$userspacePath" - -qmk git-submodule diff --git a/.github/workflows/build_binaries.yaml b/.github/workflows/build_binaries.yaml index f7908fa..6cb3aa3 100755 --- a/.github/workflows/build_binaries.yaml +++ b/.github/workflows/build_binaries.yaml @@ -8,13 +8,13 @@ permissions: jobs: build: name: 'QMK Userspace Build' - uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main + uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@qmk-userspace with: qmk_repo: qmk/qmk_firmware qmk_ref: master publish: name: 'QMK Userspace Publish' - uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main + uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@qmk-userspace if: always() && !cancelled() needs: build diff --git a/.gitignore b/.gitignore index 800a4e2..cd76b1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,3 @@ -# Junk files -*.bak -*.swp -*~ -.DS_Store -._* - -# Firmware files *.hex *.bin -*.uf2 - -# clangd -compile_commands.json -.clangd/ -.cache/ +*.uf2 \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 7b61f58..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/qmk.iml b/.idea/qmk.iml deleted file mode 100644 index 6102194..0000000 --- a/.idea/qmk.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Compile.xml b/.idea/runConfigurations/Compile.xml deleted file mode 100644 index 5c8cbd8..0000000 --- a/.idea/runConfigurations/Compile.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Flash.xml b/.idea/runConfigurations/Flash.xml deleted file mode 100644 index 7506616..0000000 --- a/.idea/runConfigurations/Flash.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 3984e9b..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,12 +0,0 @@ -// Suggested extensions -{ - "recommendations": [ - "amodio.toggle-excluded-files", - "EditorConfig.EditorConfig", - "xaver.clang-format", - "llvm-vs-code-extensions.vscode-clangd", - "bierner.github-markdown-preview", - "donjayamanne.git-extension-pack", - "ms-vscode-remote.remote-containers" - ] -} diff --git a/README.md b/README.md index 2520899..72b7d82 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ This is a template repository which allows for an external set of QMK keymaps to 1. Run the normal `qmk setup` procedure if you haven't already done so -- see [QMK Docs](https://docs.qmk.fm/#/newbs) for details. 1. Fork this repository 1. Clone your fork to your local machine -1. Enable userspace in QMK config using `qmk config user.overlay_dir="$(realpath qmk_userspace)"` 1. Add a new keymap for your board using `qmk new-keymap` * This will create a new keymap in the `keyboards` directory, in the same location that would normally be used in the main QMK repository. For example, if you wanted to add a keymap for the Planck, it will be created in `keyboards/planck/keymaps/` * You can also create a new keymap using `qmk new-keymap -kb -km ` @@ -16,7 +15,7 @@ This is a template repository which allows for an external set of QMK keymaps to 1. Add your keymap(s) to the build by running `qmk userspace-add -kb -km ` * This will automatically update your `qmk.json` file * Corresponding `qmk userspace-remove -kb -km ` will delete it - * Listing the build targets can be done with `qmk userspace-list` + * Listing the build targets can be done with with `qmk userspace-list` 1. Commit your changes ## Howto build with GitHub @@ -56,4 +55,4 @@ This can also be used to control which fork is used, though only upstream `qmk_f 1. (First time only) `git submodule add https://github.com/qmk/qmk_firmware.git` 1. (To update) `git submodule update --init --recursive` -1. Commit your changes to your userspace repository +1. Commit your changes to your userspace repository \ No newline at end of file diff --git a/keyboards/sofle/rev1/keymaps/aleidk/config.h b/keyboards/sofle/rev1/keymaps/aleidk/config.h deleted file mode 100644 index a641df8..0000000 --- a/keyboards/sofle/rev1/keymaps/aleidk/config.h +++ /dev/null @@ -1,122 +0,0 @@ - /* Copyright 2021 Dane Evans - * - * 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 . -*/ - #pragma once - - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -///https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ - -#define CUSTOM_FONT - -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding - - -#define QUICK_TAP_TERM 0 -#ifdef TAPPING_TERM - #undef TAPPING_TERM - #define TAPPING_TERM 200 -#endif -#define ENCODER_DIRECTION_FLIP - -#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD - -#define RGBLIGHT_SLEEP -// -#define RGBLIGHT_LAYERS - -/* ws2812 RGB LED */ -#define WS2812_DI_PIN D3 - - -#ifdef RGBLIGHT_ENABLE - #undef RGBLIGHT_LED_COUNT - - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - //#define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - //#define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING - //#define RGBLIGHT_EFFECT_TWINKLE - - #define RGBLIGHT_LED_COUNT 70 - #undef RGBLED_SPLIT - #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet - - //#define RGBLIGHT_LED_COUNT 30 - #undef RGBLIGHT_LIMIT_VAL - #define RGBLIGHT_LIMIT_VAL 120 - #define RGBLIGHT_HUE_STEP 10 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 -#endif - -#ifdef RGB_MATRIX_ENABLE - -#define RGB_MATRIX_DISABLE_SHARED_KEYCODES - -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -# define RGB_MATRIX_SLEEP // turn off effects when suspended -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. - -#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT - -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 8 -# define RGB_MATRIX_SPD_STEP 10 - -/* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - // # undef ENABLE_RGB_MATRIX_ALPHAS_MODS - // # undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN - // # undef ENABLE_RGB_MATRIX_BREATHING - // # undef ENABLE_RGB_MATRIX_CYCLE_ALL - // # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - // # undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN - // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN - // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - // # undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - // # undef ENABLE_RGB_MATRIX_DUAL_BEACON - // # undef ENABLE_RGB_MATRIX_RAINBOW_BEACON - // # undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS - // # undef ENABLE_RGB_MATRIX_RAINDROPS - // # undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - // # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP - // # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - // # undef ENABLE_RGB_MATRIX_SPLASH - // # undef ENABLE_RGB_MATRIX_MULTISPLASH - // # undef ENABLE_RGB_MATRIX_SOLID_SPLASH - // # undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif diff --git a/keyboards/sofle/rev1/keymaps/aleidk/keymap.c b/keyboards/sofle/rev1/keymaps/aleidk/keymap.c deleted file mode 100644 index b25f805..0000000 --- a/keyboards/sofle/rev1/keymaps/aleidk/keymap.c +++ /dev/null @@ -1,336 +0,0 @@ - - /* Copyright 2021 Dane Evans - * - * 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 . - */ - // SOFLE RGB -#include - -#include QMK_KEYBOARD_H - -#define INDICATOR_BRIGHTNESS 30 - -#define HSV_OVERRIDE_HELP(h, s, v, Override) h, s , Override -#define HSV_OVERRIDE(hsv, Override) HSV_OVERRIDE_HELP(hsv,Override) - -// Light combinations -#define SET_INDICATORS(hsv) \ - {0, 1, HSV_OVERRIDE_HELP(hsv, INDICATOR_BRIGHTNESS)}, \ - {35+0, 1, hsv} -#define SET_UNDERGLOW(hsv) \ - {1, 6, hsv}, \ - {35+1, 6,hsv} -#define SET_NUMPAD(hsv) \ - {35+15, 5, hsv},\ - {35+22, 3, hsv},\ - {35+27, 3, hsv} -#define SET_NUMROW(hsv) \ - {10, 2, hsv}, \ - {20, 2, hsv}, \ - {30, 2, hsv}, \ - {35+ 10, 2, hsv}, \ - {35+ 20, 2, hsv}, \ - {35+ 30, 2, hsv} -#define SET_INNER_COL(hsv) \ - {33, 4, hsv}, \ - {35+ 33, 4, hsv} - -#define SET_OUTER_COL(hsv) \ - {7, 4, hsv}, \ - {35+ 7, 4, hsv} -#define SET_THUMB_CLUSTER(hsv) \ - {25, 2, hsv}, \ - {35+ 25, 2, hsv} -#define SET_LAYER_ID(hsv) \ - {0, 1, HSV_OVERRIDE_HELP(hsv, INDICATOR_BRIGHTNESS)}, \ - {35+0, 1, HSV_OVERRIDE_HELP(hsv, INDICATOR_BRIGHTNESS)}, \ - {1, 6, hsv}, \ - {35+1, 6, hsv}, \ - {7, 4, hsv}, \ - {35+ 7, 4, hsv}, \ - {25, 2, hsv}, \ - {35+ 25, 2, hsv} - - -enum sofle_layers { - _DEFAULTS = 0, - _QWERTY = 0, - _SYMBOLS, - _SYSTEM, - _ADJUST, - _NUMPAD, -}; - -enum custom_keycodes { - KC_SYMBOLS = SAFE_RANGE, - KC_SYSTEM, - KC_ADJUST, - KC_D_MUTE -}; - - -// Left-hand home row mods -#define HOME_A LGUI_T(KC_A) -#define HOME_S LALT_T(KC_S) -#define HOME_D LSFT_T(KC_D) -#define HOME_F LCTL_T(KC_F) - -// Right-hand home row mods -#define HOME_J RCTL_T(KC_J) -#define HOME_K RSFT_T(KC_K) -#define HOME_L LALT_T(KC_L) -#define HOME_SCLN RGUI_T(KC_SCLN) - -// Other multi pourpose keys -#define SIDE_TAB LT(_NUMPAD, KC_TAB) // layer on held, tab on tap - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - SIDE_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, ALGR(KC_QUOT), - KC_ESC, HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN, KC_BSPC, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_D_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LALT, KC_LCTL, KC_LGUI, KC_SPC, KC_SYMBOLS, KC_SYSTEM, KC_ENT, KC_RGUI, KC_RCTL, KC_ALGR -), -[_SYMBOLS] = LAYOUT( - _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), _______, - _______, ALGR(KC_SLSH), S(KC_SLSH), KC_LBRC, KC_RBRC, KC_QUOT, S(KC_EQL), S(KC_8), KC_SLASH, KC_MINS, S(KC_6), _______, - _______, S(KC_COMM), S(KC_DOT), S(KC_9), S(KC_0), S(KC_QUOT), S(KC_BSLS), S(KC_4), S(KC_3), KC_EQL, KC_BSLS, _______, - _______, RSA(KC_1), S(KC_1), S(KC_LBRC), S(KC_RBRC), KC_GRV, _______, _______, S(KC_7), S(KC_5), XXXXXXX, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -[_SYSTEM] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, KC_INS, XXXXXXX, S(KC_PSCR), KC_PSCR, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_RPRN, KC_BSPC, - _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, KC_PGUP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, KC_DEL, - _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -[_ADJUST] = LAYOUT( - EE_CLR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - UG_TOGG, UG_HUEU, UG_SATU, UG_VALU, _______, _______, C(G(KC_LEFT)), XXXXXXX, XXXXXXX,C(G(KC_RGHT)),XXXXXXX,XXXXXXX, - UG_NEXT, UG_HUED, UG_SATD, UG_VALD, XXXXXXX, _______,XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -[_NUMPAD] = LAYOUT( - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_NUM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CIRC, KC_P7, KC_P8, KC_P9, KC_ASTR, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_P4, KC_P5, KC_P6, KC_EQL, KC_PIPE, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PLUS, KC_P1, KC_P2, KC_P3, KC_SLSH, _______, - _______, OSM(MOD_MEH), _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______ -), -}; - -#ifdef RGBLIGHT_ENABLE -char layer_state_str[70]; -// Now define the array of layers. Later layers take precedence - -// QWERTY, -// Light on inner column and underglow -const rgblight_segment_t PROGMEM layer_qwerty_lights[] = RGBLIGHT_LAYER_SEGMENTS( - SET_LAYER_ID(HSV_RED) - -); - -// _NUM, -// Light on outer column and underglow -const rgblight_segment_t PROGMEM layer_num_lights[] = RGBLIGHT_LAYER_SEGMENTS( - SET_NUMROW(HSV_TEAL) - -); -// _SYMBOL, -// Light on inner column and underglow -const rgblight_segment_t PROGMEM layer_symbol_lights[] = RGBLIGHT_LAYER_SEGMENTS( - SET_LAYER_ID(HSV_PURPLE), - SET_THUMB_CLUSTER(HSV_PURPLE) - ); -// _COMMAND, -// Light on inner column and underglow -const rgblight_segment_t PROGMEM layer_command_lights[] = RGBLIGHT_LAYER_SEGMENTS( - SET_LAYER_ID(HSV_PURPLE), - SET_THUMB_CLUSTER(HSV_PURPLE) -); - -//_NUMPAD -const rgblight_segment_t PROGMEM layer_numpad_lights[] = RGBLIGHT_LAYER_SEGMENTS( - SET_INDICATORS(HSV_ORANGE), - SET_UNDERGLOW(HSV_ORANGE), - SET_NUMPAD(HSV_BLUE), - {7, 4, HSV_ORANGE}, - {25, 2, HSV_ORANGE}, - {35+6, 4, HSV_ORANGE}, - {35+25, 2, HSV_ORANGE} - ); - -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - layer_qwerty_lights, - layer_num_lights,// overrides layer 1 - layer_symbol_lights, - layer_numpad_lights, - layer_numpad_lights -); - -layer_state_t layer_state_set_user(layer_state_t state) { - rgblight_set_layer_state(0, layer_state_cmp(state, _DEFAULTS) && layer_state_cmp(default_layer_state,_QWERTY)); - - rgblight_set_layer_state(1, layer_state_cmp(state, _SYMBOLS)); - rgblight_set_layer_state(2, layer_state_cmp(state, _SYSTEM)); - rgblight_set_layer_state(3, layer_state_cmp(state, _ADJUST)); - rgblight_set_layer_state(4, layer_state_cmp(state, _NUMPAD)); - return state; -} - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = my_rgb_layers; - - rgblight_mode(10);// haven't found a way to set this in a more useful way - -} -#endif - -#ifdef OLED_ENABLE - -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 - }; - - oled_write_P(qmk_logo, false); -} - -static void print_status_narrow(void) { - // Print current layer - oled_write_ln_P(PSTR("LAYER"), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Base\n"), false); - break; - case _SYSTEM: - oled_write_P(PSTR("Sys\n"), false); - break; - case _SYMBOLS: - oled_write_P(PSTR("Symb\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adj\n"), false); - break; - case _NUMPAD: - oled_write_P(PSTR("Nump\n"), false); - break; - default: - oled_write_ln_P(PSTR("Undef\n"), false); - } -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (is_keyboard_master()) { - return OLED_ROTATION_270; - } - return rotation; -} - -bool oled_task_user(void) { - if (is_keyboard_master()) { - print_status_narrow(); - } else { - render_logo(); - } - return false; -} - -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_SYMBOLS: - if (record->event.pressed) { - layer_on(_SYMBOLS); - update_tri_layer(_SYMBOLS, _SYSTEM, _ADJUST); - } else { - layer_off(_SYMBOLS); - update_tri_layer(_SYMBOLS, _SYSTEM, _ADJUST); - } - return false; - case KC_SYSTEM: - if (record->event.pressed) { - layer_on(_SYSTEM); - update_tri_layer(_SYMBOLS, _SYSTEM, _ADJUST); - } else { - layer_off(_SYSTEM); - update_tri_layer(_SYMBOLS, _SYSTEM, _ADJUST); - } - return false; - case KC_ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - case KC_D_MUTE: - if (record->event.pressed) { - register_mods(mod_config(MOD_MEH)); - register_code(KC_UP); - } else { - unregister_mods(mod_config(MOD_MEH)); - unregister_code(KC_UP); - } - } - return true; -} - -#ifdef ENCODER_ENABLE - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Uncomment this to use the encoder to control the volume - // if (clockwise) { - // tap_code(KC_VOLU); - // } else { - // tap_code(KC_VOLD); - // } - - switch (get_highest_layer(layer_state)) { - case _QWERTY: - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - break; - case _SYSTEM: - case _SYMBOLS: - if (clockwise) { - tap_code(KC_DOWN); - } else { - tap_code(KC_UP); - } - break; - default: - if (clockwise) { - tap_code(KC_WH_D); - } else { - tap_code(KC_WH_U); - } - break; - } - } - return false; -} - -#endif diff --git a/keyboards/sofle/rev1/keymaps/aleidk/readme.md b/keyboards/sofle/rev1/keymaps/aleidk/readme.md deleted file mode 100644 index 879513a..0000000 --- a/keyboards/sofle/rev1/keymaps/aleidk/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -![SofleKeyboard default keymap](https://i.imgur.com/MZxVvm9.png) -![SofleKeyboard adjust layer](https://i.imgur.com/f5sKy0I.png) - -# Default keymap for Sofle Keyboard - -Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) - -Features: - -- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) -- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM. -- Modes for Qwerty and Colemak support -- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often. -- The OLED on master half shows selected mode and caps lock state and is rotated. -- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. diff --git a/keyboards/sofle/rev1/keymaps/aleidk/rules.mk b/keyboards/sofle/rev1/keymaps/aleidk/rules.mk deleted file mode 100644 index e4baab0..0000000 --- a/keyboards/sofle/rev1/keymaps/aleidk/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -RGBLIGHT_ENABLE = yes -ENCODER_ENABLE = yes -LTO_ENABLE = yes -OLED_ENABLE = yes -CAPS_WORD_ENABLE = yes diff --git a/qmk.json b/qmk.json index 3cc6340..3afc389 100644 --- a/qmk.json +++ b/qmk.json @@ -1,6 +1,4 @@ { - "userspace_version": "1.1", - "build_targets": [ - ["sofle/rev1", "aleidk"] - ] + "userspace_version": "1.0", + "build_targets": [] } \ No newline at end of file