summaryrefslogtreecommitdiff
path: root/users/bcat/config.h
diff options
context:
space:
mode:
authorJonathan Rascher <jon@bcat.name>2021-12-26 21:46:00 -0600
committerGitHub <noreply@github.com>2021-12-27 14:46:00 +1100
commit93bc737a8fcb3ccac86772560a0e2b5bd91051c5 (patch)
tree12b2970145f6ab6b4c24fd8cb7eba9444bca4b93 /users/bcat/config.h
parent4d1ed37bdcb3641e35dc2324592a1f7fa0509bd2 (diff)
[Keymap] Update bcat's keymaps/userspace to share logic, add OLED functionality, and set up one of my macropads for WFH (#14702)
* Add script to build all bcat keymaps at once * Move userspace RGB to separate source file * Move layer handling logic into userspace * Move keycap aliases into userspace * Add OLED userspace library and Lily58 OLED setup * Add Luna keyboard pet, generic OLED pet framework Luna artwork and original implementation by HellSingCoder, licensed under GPL v2.0. See also: https://github.com/qmk/qmk_firmware/blob/6dfe915e26d7147e6c2bed495d3b01cf5b21e6ec/keyboards/sofle/keymaps/helltm/keymap.c * Use OLED on bcat's Crkbd I had to turn off a few unused features to address firmware size limits. * Remove vestigial NK_TOGG keybindings * Add post-render hook to OLED pet API This enables OLED pets to draw custom widgets (e.g., LED indicator status) on top of their animation frames. * Add Isda keyboard pet For future use on my Unicorne keyboard. Unicorn artwork by sparrow666, licensed under GPL v2.0. See also: https://opengameart.org/content/unicorn-2 * Replace OLED timeout implementation with custom The default implementation never lets the OLED turn off if a continuous animation is in progress. The custom one does. * Move keyboard state for OLED functions into struct No change in firmware size, but makes keymaps read a little nicer and enables more functionality in OLED pets. * Enable continuously running OLED pet (for Luna) * Sync OLED state; enable Bootmagic only when needed The new extensible split transport for Split Common finally allows OLED on/off status to be synced between halves of the keyboard. :) Unfortunately, this required disabling Bootmagic Lite to keep my Crkbd under the firmware size limit. (I now after 28 bytes free on avr-gcc version 8.5.0.) So now I'll enable Bootmagic only on keyboards that actually require it, i.e., ones lacking an accessible reset button. * Update 9-Key macropad keymap for working from home * Remove includes redundant with quantum.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Simplify BCAT_OLED_PET makefile logic * Swap some keys on my 9-Key macropad around * Inline spurious variable in OLED code * Remove max brightness that's now set by default The default max brightness is only 120 rather than 150, but that might actually fix some weirdness I've seen with bright white LED settings. * Enable specific RGBLIGHT modes instead of default The general trend these days seems to be enabling only the modes you want, so I'm manually expanding the ones currently enabled by RGBLIGHT_ANIMATIONS. I'd like to try out the TWINKLE mode too, but it seems not to work at all on ARM right now, and all my usable RGBLIGHT keebs are ARM boards. * Reenable RGB_MATRIX animations after #15018 My Crkbd still has a reasonable amount of free space with these: 27974/28672 (97%, 698 bytes free). The RGB_MATRIX_KEYPRESSES effects would put it over the firmware size limit, but I really don't ever use those anyway. * Use new get_u8_str function for WPM display Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'users/bcat/config.h')
-rw-r--r--users/bcat/config.h79
1 files changed, 75 insertions, 4 deletions
diff --git a/users/bcat/config.h b/users/bcat/config.h
index 5bb93f3833..7bb5d71bae 100644
--- a/users/bcat/config.h
+++ b/users/bcat/config.h
@@ -14,6 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* Enable NKRO by default. All my devices support this, and it enables me to
+ * dispense with the NK_TOGG key, thus saving firmware space by not compiling
+ * magic keycode support.
+ */
+#define FORCE_NKRO
+
/* Wait between tap_code register and unregister to fix flaky media keys. */
#undef TAP_CODE_DELAY
@@ -31,6 +37,22 @@
*/
#define TAPPING_FORCE_HOLD
+#if defined(OLED_ENABLE)
+/* The built-in OLED timeout wakes the OLED screen every time the buffer is
+ * updated, even if no user activity has occurred recently. This prevents the
+ * OLED from ever turning off during a continuously running animation. To avoid
+ * this, we disable the default timeout and implement our own in
+ * oled_task_user.
+ */
+# undef OLED_TIMEOUT
+# define OLED_DISABLE_TIMEOUT
+
+# if defined(SPLIT_KEYBOARD)
+/* Sync OLED on/off state between halves of split keyboards. */
+# define SPLIT_OLED_ENABLE
+# endif
+#endif
+
#if defined(RGB_MATRIX_ENABLE)
/* Turn off per-key RGB when the host goes to sleep. */
# define RGB_DISABLE_WHEN_USB_SUSPENDED
@@ -46,9 +68,42 @@
# define RGB_MATRIX_VAL_STEP 17
# define RGB_MATRIX_SPD_STEP 17
-/* Turn on additional RGB animations. */
+/* Enable specific per-key animation modes. */
+# define ENABLE_RGB_MATRIX_ALPHAS_MODS
+# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+# define ENABLE_RGB_MATRIX_BAND_SAT
+# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+# define ENABLE_RGB_MATRIX_BAND_VAL
+# define ENABLE_RGB_MATRIX_BREATHING
+# define ENABLE_RGB_MATRIX_CYCLE_ALL
+# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+# define ENABLE_RGB_MATRIX_DUAL_BEACON
+# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define ENABLE_RGB_MATRIX_HUE_BREATHING
+# define ENABLE_RGB_MATRIX_HUE_PENDULUM
+# define ENABLE_RGB_MATRIX_HUE_WAVE
+# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+# define ENABLE_RGB_MATRIX_PIXEL_RAIN
+# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+# define ENABLE_RGB_MATRIX_RAINDROPS
+
+/* Enable additional per-key animation modes that require a copy of the
+ * framebuffer (with accompanying storage cost).
+ */
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define RGB_MATRIX_KEYPRESSES
+# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#endif
#if defined(RGBLIGHT_ENABLE)
@@ -64,8 +119,18 @@
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
-/* Turn on additional RGB animations. */
-# define RGBLIGHT_ANIMATIONS
+/* Enable specific underglow animation modes. (Skip TWINKLE because it seems to
+ * be broken on ARM: https://github.com/qmk/qmk_firmware/issues/15345.)
+ */
+# define RGBLIGHT_EFFECT_ALTERNATING
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_CHRISTMAS
+# define RGBLIGHT_EFFECT_KNIGHT
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_RGB_TEST
+# define RGBLIGHT_EFFECT_SNAKE
+# define RGBLIGHT_EFFECT_STATIC_GRADIENT
#endif
#if defined(BACKLIGHT_ENABLE)
@@ -77,3 +142,9 @@
# define BACKLIGHT_LEVELS 7
#endif
+
+/* Turn off unused config options to reduce firmware size. */
+#define LAYER_STATE_8BIT
+#define NO_ACTION_ONESHOT
+#undef LOCKING_RESYNC_ENABLE
+#undef LOCKING_SUPPORT_ENABLE