diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b15f301865ec..591bc2424353 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v5 + - uses: actions/stale@v7 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index d843f5b1c4f4..ce7edecaaafc 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -31,16 +31,21 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 +#define RGBLED_NUM 20 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 -// Underglow -/* -#undef RGBLED_NUM -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_SLEEP -*/ +#undef RGB_DI_PIN +#define RGB_DI_PIN D4 +#define RGBLED_SPLIT { 10, 10 } + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODERS_PAD_A_RIGHT { F5 } +#define ENCODERS_PAD_B_RIGHT { F4 } +#define ENCODER_RESOLUTION 2 + +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 185b8ac692bf..0e9b67607d38 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -105,9 +105,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (!is_keyboard_master()) - return OLED_ROTATION_180; // flips the display 180 degrees if offhand - return rotation; + return OLED_ROTATION_180; } // When you add source files to SRC in rules.mk, you can use functions. @@ -147,3 +145,50 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + + if (index == 0) { // Left + switch (biton32(layer_state)) { + case _QWERTY: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { // Right + switch (biton32(layer_state)) { + case _QWERTY: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + default: + // Scroll through tabs + if (clockwise) { + tap_code16(C(KC_TAB)); + } else { + tap_code16(S(C(KC_TAB))); + } + break; + } + } + return true; +} +#endif diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index 063ca44024c1..017fc10e23dd 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -6,9 +6,9 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_ENABLE= yes # OLED display +OLED_ENABLE = yes # OLED display # If you want to change the display of OLED, you need to change here SRC += ./lib/rgb_state_reader.c \