summaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
authorWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
committerWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
commite7f4d56592b3975c38af329e77b4efd9108495e8 (patch)
tree0a416bccbf70bfdbdb9ffcdb3bf136b47378c014 /users/drashna
parent71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (diff)
parent8416a94ad27b3ff058576f09f35f0704a8b39ff3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/.gitlab-ci.yml2
-rw-r--r--users/drashna/config.h139
-rw-r--r--users/drashna/drashna.c198
-rw-r--r--users/drashna/drashna.h79
-rw-r--r--users/drashna/font_gmk_bad.h241
-rw-r--r--users/drashna/hue_manitee_font.h241
-rw-r--r--users/drashna/process_records.c220
-rw-r--r--users/drashna/process_records.h75
-rw-r--r--users/drashna/readme.md192
-rw-r--r--users/drashna/readme_handlers.md97
-rw-r--r--users/drashna/readme_keycodes.md10
-rw-r--r--users/drashna/readme_rgb.md43
-rw-r--r--users/drashna/readme_secrets.md123
-rw-r--r--users/drashna/readme_tap_dance.md119
-rw-r--r--users/drashna/readme_wrappers.md11
-rw-r--r--users/drashna/rgb_stuff.c427
-rw-r--r--users/drashna/rgb_stuff.h29
-rw-r--r--users/drashna/rgblight_breathe_table.h8
-rw-r--r--users/drashna/rules.mk27
-rw-r--r--users/drashna/send_unicode.h71
-rw-r--r--users/drashna/tap_dances.c77
-rw-r--r--users/drashna/tap_dances.h16
-rw-r--r--users/drashna/template.c130
-rw-r--r--users/drashna/template.h15
-rw-r--r--users/drashna/wrappers.h18
25 files changed, 1648 insertions, 960 deletions
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
index 679bdf4351..7218a21bec 100644
--- a/users/drashna/.gitlab-ci.yml
+++ b/users/drashna/.gitlab-ci.yml
@@ -10,7 +10,7 @@ QMK Firmware:
image: ubuntu:18.10
before_script:
- apt-get update -qy
- - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr unzip wget zip
+ - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip
- avr-gcc --version
- uname -a
script:
diff --git a/users/drashna/config.h b/users/drashna/config.h
index a6d8e75263..6fafff8604 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -1,47 +1,105 @@
#pragma once
+// Use custom magic number so that when switching branches, EEPROM always gets reset
+#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1337
-#ifdef AUDIO_ENABLE
-# define AUDIO_CLICKY
-# define STARTUP_SONG SONG(RICK_ROLL)
-# define GOODBYE_SONG SONG(SONIC_RING)
-# define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
- SONG(COLEMAK_SOUND), \
- SONG(DVORAK_SOUND), \
- SONG(OVERWATCH_THEME) \
- }
-
-# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
+/* Set Polling rate to 1000Hz */
+#define USB_POLLING_INTERVAL_MS 1
-# define UNICODE_SONG_OSX SONG(RICK_ROLL)
-# define UNICODE_SONG_LNX SONG(RICK_ROLL)
-# define UNICODE_SONG_WIN SONG(RICK_ROLL)
-# define UNICODE_SONG_BSD SONG(RICK_ROLL)
-# define UNICODE_SONG_WINC SONG(RICK_ROLL)
-
-#endif // !AUDIO_ENABLE
+#ifdef AUDIO_ENABLE
+# if __GNUC__ > 5
+# if __has_include("drashna_song_list.h")
+# include "drashna_song_list.h"
+# endif // if file exists
+# endif // __GNUC__
+
+# define AUDIO_CLICKY
+# define STARTUP_SONG SONG(RICK_ROLL)
+# define GOODBYE_SONG SONG(SONIC_RING)
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
+
+# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
+
+# define UNICODE_SONG_OSX SONG(RICK_ROLL)
+# define UNICODE_SONG_LNX SONG(RICK_ROLL)
+# define UNICODE_SONG_WIN SONG(RICK_ROLL)
+# define UNICODE_SONG_BSD SONG(RICK_ROLL)
+# define UNICODE_SONG_WINC SONG(RICK_ROLL)
+#endif // !AUDIO_ENABLE
#ifdef RGBLIGHT_ENABLE
-# define RGBLIGHT_SLEEP
-# undef RGBLIGHT_ANIMATIONS
-# define RGBLIGHT_EFFECT_BREATHING
-# define RGBLIGHT_EFFECT_SNAKE
-# define RGBLIGHT_EFFECT_KNIGHT
-#endif // RGBLIGHT_ENABLE
+# undef RGBLIGHT_ANIMATIONS
+# if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
+# define RGBLIGHT_SLEEP
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_SNAKE
+# define RGBLIGHT_EFFECT_KNIGHT
+# else
+# define RGBLIGHT_ANIMATIONS
+# endif
+#endif // RGBLIGHT_ENABLE
+
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
+// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
+# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+// # define EECONFIG_RGB_MATRIX (uint32_t *)16
+
+# if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
+# define DISABLE_RGB_MATRIX_ALPHAS_MODS
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_BREATHING
+# define DISABLE_RGB_MATRIX_BAND_SAT
+# define DISABLE_RGB_MATRIX_BAND_VAL
+# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+# define DISABLE_RGB_MATRIX_CYCLE_ALL
+# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
+// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+# define DISABLE_RGB_MATRIX_DUAL_BEACON
+# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
+# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+# define DISABLE_RGB_MATRIX_RAINDROPS
+# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP
+# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+# define DISABLE_RGB_MATRIX_SPLASH
+# define DISABLE_RGB_MATRIX_MULTISPLASH
+# define DISABLE_RGB_MATRIX_SOLID_SPLASH
+# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+# endif // AVR
+#endif // RGB_MATRIX_ENABLE
#ifndef ONESHOT_TAP_TOGGLE
-# define ONESHOT_TAP_TOGGLE 2
-#endif // !ONESHOT_TAP_TOGGLE
+# define ONESHOT_TAP_TOGGLE 2
+#endif // !ONESHOT_TAP_TOGGLE
#ifndef ONESHOT_TIMEOUT
-# define ONESHOT_TIMEOUT 3000
-#endif// !ONESHOT_TIMEOUT
+# define ONESHOT_TIMEOUT 3000
+#endif // !ONESHOT_TIMEOUT
#ifndef QMK_KEYS_PER_SCAN
-# define QMK_KEYS_PER_SCAN 4
-#endif // !QMK_KEYS_PER_SCAN
-
-
+# define QMK_KEYS_PER_SCAN 4
+#endif // !QMK_KEYS_PER_SCAN
// this makes it possible to do rolling combos (zx) with keys that
// convert to other keys on hold (z becomes ctrl when you hold it,
@@ -55,27 +113,26 @@
#define FORCE_NKRO
#ifndef TAPPING_TOGGLE
-# define TAPPING_TOGGLE 1
+# define TAPPING_TOGGLE 1
#endif
#ifdef TAPPING_TERM
-# undef TAPPING_TERM
-#endif // TAPPING_TERM
+# undef TAPPING_TERM
+#endif // TAPPING_TERM
#if defined(KEYBOARD_ergodox_ez)
-# define TAPPING_TERM 185
+# define TAPPING_TERM 185
#elif defined(KEYBOARD_crkbd)
-# define TAPPING_TERM 200
+# define TAPPING_TERM 200
#else
-# define TAPPING_TERM 175
+# define TAPPING_TERM 175
#endif
-
#define TAP_CODE_DELAY 5
/* Disable unused and unneeded features to reduce on firmware size */
#ifdef LOCKING_SUPPORT_ENABLE
-# undef LOCKING_SUPPORT_ENABLE
+# undef LOCKING_SUPPORT_ENABLE
#endif
#ifdef LOCKING_RESYNC_ENABLE
-# undef LOCKING_RESYNC_ENABLE
+# undef LOCKING_RESYNC_ENABLE
#endif
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index acc6b9f9ed..71779a6215 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -19,40 +19,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
userspace_config_t userspace_config;
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- #define DRASHNA_UNICODE_MODE UC_WIN
+# define DRASHNA_UNICODE_MODE UC_WIN
#else
- // set to 2 for UC_WIN, set to 4 for UC_WINC
- #define DRASHNA_UNICODE_MODE 2
+// set to 2 for UC_WIN, set to 4 for UC_WINC
+# define DRASHNA_UNICODE_MODE 2
#endif
-
-// This block is for all of the gaming macros, as they were all doing
-// the same thing, but with differring text sent.
-bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
- if (!record->event.pressed || override) {
- uint16_t keycode;
- if (userspace_config.is_overwatch) {
- keycode = KC_BSPC;
- } else {
- keycode = KC_ENTER;
- }
- clear_keyboard();
- tap_code(keycode);
- wait_ms(TAP_CODE_DELAY);
- send_string_with_delay(str, TAP_CODE_DELAY);
- wait_ms(TAP_CODE_DELAY);
- tap_code(KC_ENTER);
- }
- if (override) wait_ms(3000);
- return false;
-}
-
-bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) {
+bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
static uint16_t this_timer;
- if(pressed) {
- this_timer= timer_read();
+ if (pressed) {
+ this_timer = timer_read();
} else {
- if (timer_elapsed(this_timer) < TAPPING_TERM){
+ if (timer_elapsed(this_timer) < TAPPING_TERM) {
tap_code(code);
} else {
register_code(mod_code);
@@ -63,11 +41,11 @@ bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) {
return false;
}
-bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) {
- if(pressed) {
- this_timer= timer_read();
+bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) {
+ if (pressed) {
+ this_timer = timer_read();
} else {
- if (timer_elapsed(this_timer) < TAPPING_TERM){
+ if (timer_elapsed(this_timer) < TAPPING_TERM) {
tap_code(code);
} else {
register_code(mod_code);
@@ -80,90 +58,85 @@ bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t thi
void bootmagic_lite(void) {
matrix_scan();
- #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
- wait_ms(DEBOUNCING_DELAY * 2);
- #elif defined(DEBOUNCE) && DEBOUNCE > 0
- wait_ms(DEBOUNCE * 2);
- #else
- wait_ms(30);
- #endif
+#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
+ wait_ms(DEBOUNCING_DELAY * 2);
+#elif defined(DEBOUNCE) && DEBOUNCE > 0
+ wait_ms(DEBOUNCE * 2);
+#else
+ wait_ms(30);
+#endif
matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
bootloader_jump();
}
}
+__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
+
+void keyboard_pre_init_user(void) {
+ userspace_config.raw = eeconfig_read_user();
+ keyboard_pre_init_keymap();
+}
// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
// functions in the keymaps
-__attribute__ ((weak))
-void matrix_init_keymap(void) {}
+__attribute__((weak)) void matrix_init_keymap(void) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
- userspace_config.raw = eeconfig_read_user();
-
- #ifdef BOOTLOADER_CATERINA
- DDRD &= ~(1<<5);
- PORTD &= ~(1<<5);
+#if defined(BOOTLOADER_CATERINA) && defined(__AVR__)
+ DDRD &= ~(1 << 5);
+ PORTD &= ~(1 << 5);
- DDRB &= ~(1<<0);
- PORTB &= ~(1<<0);
- #endif
+ DDRB &= ~(1 << 0);
+ PORTB &= ~(1 << 0);
+#endif
- #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- set_unicode_input_mode(DRASHNA_UNICODE_MODE);
- get_unicode_input_mode();
- #endif //UNICODE_ENABLE
+#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+ set_unicode_input_mode(DRASHNA_UNICODE_MODE);
+ get_unicode_input_mode();
+#endif // UNICODE_ENABLE
matrix_init_keymap();
}
-__attribute__((weak))
-void keyboard_post_init_keymap(void){ }
+__attribute__((weak)) void keyboard_post_init_keymap(void) {}
-void keyboard_post_init_user(void){
-#ifdef RGBLIGHT_ENABLE
+void keyboard_post_init_user(void) {
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
keyboard_post_init_rgb();
#endif
keyboard_post_init_keymap();
}
-__attribute__ ((weak))
-void shutdown_keymap(void) {}
-
-void shutdown_user (void) {
- #ifdef RGBLIGHT_ENABLE
- rgblight_enable_noeeprom();
- rgblight_mode_noeeprom(1);
- rgblight_setrgb_red();
- #endif // RGBLIGHT_ENABLE
- #ifdef RGB_MATRIX_ENABLE
- // uint16_t timer_start = timer_read();
- // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
- // while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
- #endif //RGB_MATRIX_ENABLE
- shutdown_keymap();
-}
+__attribute__((weak)) void shutdown_keymap(void) {}
-__attribute__ ((weak))
-void suspend_power_down_keymap(void) {}
+void rgb_matrix_update_pwm_buffers(void);
-void suspend_power_down_user(void) {
- suspend_power_down_keymap();
+void shutdown_user(void) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_enable_noeeprom();
+ rgblight_mode_noeeprom(1);
+ rgblight_setrgb_red();
+#endif // RGBLIGHT_ENABLE
+#ifdef RGB_MATRIX_ENABLE
+ rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
+ rgb_matrix_update_pwm_buffers();
+
+#endif // RGB_MATRIX_ENABLE
+ shutdown_keymap();
}
-__attribute__ ((weak))
-void suspend_wakeup_init_keymap(void) {}
+__attribute__((weak)) void suspend_power_down_keymap(void) {}
-void suspend_wakeup_init_user(void) {
- suspend_wakeup_init_keymap();
-}
+void suspend_power_down_user(void) { suspend_power_down_keymap(); }
+__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
-__attribute__ ((weak))
-void matrix_scan_keymap(void) {}
+void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
+
+__attribute__((weak)) void matrix_scan_keymap(void) {}
// No global matrix scan code, so just run keymap's matrix
// scan function
@@ -176,69 +149,66 @@ void matrix_scan_user(void) {
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
-#ifdef RGBLIGHT_ENABLE
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
matrix_scan_rgb();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
matrix_scan_keymap();
}
-
-__attribute__ ((weak))
-layer_state_t layer_state_set_keymap (layer_state_t state) {
- return state;
-}
+__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
-#ifdef RGBLIGHT_ENABLE
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
state = layer_state_set_rgb(state);
-#endif // RGBLIGHT_ENABLE
- return layer_state_set_keymap (state);
+#endif // RGBLIGHT_ENABLE
+ return layer_state_set_keymap(state);
}
-
-__attribute__ ((weak))
-layer_state_t default_layer_state_set_keymap (layer_state_t state) {
- return state;
-}
+__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) {
state = default_layer_state_set_keymap(state);
#if 0
-#ifdef RGBLIGHT_ENABLE
+# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
state = default_layer_state_set_rgb(state);
-#endif // RGBLIGHT_ENABLE
+# endif // RGBLIGHT_ENABLE
#endif
return state;
}
-__attribute__ ((weak))
-void led_set_keymap(uint8_t usb_led) {}
+__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
// Any custom LED code goes here.
// So far, I only have keyboard specific code,
// So nothing goes here.
-void led_set_user(uint8_t usb_led) {
- led_set_keymap(usb_led);
-}
+void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
-__attribute__ ((weak))
-void eeconfig_init_keymap(void) {}
+__attribute__((weak)) void eeconfig_init_keymap(void) {}
void eeconfig_init_user(void) {
- userspace_config.raw = 0;
+ userspace_config.raw = 0;
userspace_config.rgb_layer_change = true;
eeconfig_update_user(userspace_config.raw);
- #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(DRASHNA_UNICODE_MODE);
get_unicode_input_mode();
- #else
+#else
eeprom_update_byte(EECONFIG_UNICODEMODE, DRASHNA_UNICODE_MODE);
- #endif
+#endif
+ eeconfig_init_keymap();
+ keyboard_init();
+}
+
+bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
+ value &= 0xF;
+ mask &= 0xF;
+
+ return (value & mask) == mask;
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 507504f04e..0ba1817604 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -16,26 +16,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
-#include "quantum.h"
+#include QMK_KEYBOARD_H
+
#include "version.h"
#include "eeprom.h"
#include "wrappers.h"
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
-# include "tap_dances.h"
-#endif // TAP_DANCE_ENABLE
+# include "tap_dances.h"
+#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
-# include "rgb_stuff.h"
-#endif
-#if defined(AUDIO_ENABLE) && __GNUC__ > 7
-# if __has_include("drashna_song_list.h")
-# include "drashna_song_list.h"
-# endif
+# include "rgb_stuff.h"
#endif
/* Define layer names */
enum userspace_layers {
- _QWERTY = 0,
+ _QWERTY = 0,
_NUMLOCK = 0,
_COLEMAK,
_DVORAK,
@@ -54,51 +50,48 @@ enum userspace_layers {
_ADJUST,
};
-/*
-define modifiers here, since MOD_* doesn't seem to work for these
- */
-
-
-bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
-bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
-bool send_game_macro(const char *str, keyrecord_t *record, bool override);
-void matrix_init_keymap(void);
-void shutdown_keymap(void);
-void suspend_power_down_keymap(void);
-void suspend_wakeup_init_keymap(void);
-void matrix_scan_keymap(void);
-layer_state_t layer_state_set_keymap (layer_state_t state);
-layer_state_t default_layer_state_set_keymap (layer_state_t state);
-void led_set_keymap(uint8_t usb_led);
-void eeconfig_init_keymap(void);
+bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
+bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
+void matrix_init_keymap(void);
+void shutdown_keymap(void);
+void suspend_power_down_keymap(void);
+void suspend_wakeup_init_keymap(void);
+void matrix_scan_keymap(void);
+layer_state_t layer_state_set_keymap(layer_state_t state);
+layer_state_t default_layer_state_set_keymap(layer_state_t state);
+void led_set_keymap(uint8_t usb_led);
+void eeconfig_init_keymap(void);
+bool hasAllBitsInMask(uint8_t value, uint8_t mask);
+// clang-format off
typedef union {
uint32_t raw;
struct {
- bool rgb_layer_change :1;
- bool is_overwatch :1;
- bool nuke_switch :1;
- uint8_t unicode_mod :4;
- bool swapped_numbers :1;
+ bool rgb_layer_change :1;
+ bool is_overwatch :1;
+ bool nuke_switch :1;
+ uint8_t unicode_mod :4;
+ bool swapped_numbers :1;
+ bool rgb_matrix_idle_anim :1;
};
} userspace_config_t;
+// clang-format on
extern userspace_config_t userspace_config;
-
/*
Custom Keycodes for Diablo 3 layer
But since TD() doesn't work when tap dance is disabled
We use custom codes here, so we can substitute the right stuff
*/
#ifdef TAP_DANCE_ENABLE
-# define KC_D3_1 TD(TD_D3_1)
-# define KC_D3_2 TD(TD_D3_2)
-# define KC_D3_3 TD(TD_D3_3)
-# define KC_D3_4 TD(TD_D3_4)
-#else // TAP_DANCE_ENABLE
-# define KC_D3_1 KC_1
-# define KC_D3_2 KC_2
-# define KC_D3_3 KC_3
-# define KC_D3_4 KC_4
-#endif // TAP_DANCE_ENABLE
+# define KC_D3_1 TD(TD_D3_1)
+# define KC_D3_2 TD(TD_D3_2)
+# define KC_D3_3 TD(TD_D3_3)
+# define KC_D3_4 TD(TD_D3_4)
+#else // TAP_DANCE_ENABLE
+# define KC_D3_1 KC_1
+# define KC_D3_2 KC_2
+# define KC_D3_3 KC_3
+# define KC_D3_4 KC_4
+#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h
new file mode 100644
index 0000000000..c1c5c390a9
--- /dev/null
+++ b/users/drashna/font_gmk_bad.h
@@ -0,0 +1,241 @@
+#pragma once
+
+#ifdef __AVR__
+# include <avr/io.h>
+# include <avr/pgmspace.h>
+#elif defined(ESP8266)
+# include <pgmspace.h>
+#else
+# define PROGMEM
+#endif
+
+// Corne 8x6 font with QMK Firmware Logo
+// Online editor: https://helixfonteditor.netlify.com/
+
+// clang-format off
+const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+ 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+ 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+ 0x18, 0x3C, 0x7E, 0x3C, 0x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 0x00,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+ 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+ 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+ 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+ 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+ 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+ 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+ 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+ 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+ 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+ 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+ 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+ 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+ 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+ 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+ 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+ 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+ 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+ 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+ 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+ 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+ 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+ 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+ 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+ 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+ 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+ 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+ 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+ 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+ 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+ 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+ 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+ 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+ 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+ 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+ 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
+ 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+ 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+ 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+ 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+ 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
+ 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+ 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+ 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+ 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+ 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+ 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+ 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00,
+ 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+ 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+ 0x00, 0x00,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