opensteno_qmk/users/ninjonas/ninjonas.c

39 lines
1.4 KiB
C
Raw Normal View History

/* Copyright 2019 @ninjonas
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "ninjonas.h"
layer_state_t layer_state_set_user (layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
#ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config;
#endif
void keyboard_post_init_user() {
#ifdef RGBLIGHT_ENABLE
// Cycles through the entire hue wheel and resetting to default color
uint16_t default_hue = rgblight_config.hue;
rgblight_enable_noeeprom();
layer_state_set_user(layer_state);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
for (uint16_t i = 255; i > 0; i--) {
rgblight_sethsv_noeeprom((i + default_hue) % 255, rgblight_config.sat, rgblight_config.val);
matrix_scan();
wait_ms(10);
}
#endif
layer_state_set_user(layer_state);
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (#6797) * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [refactor(crkbd)] reducing file size by selecting RGB animations * [refactor(crkbd)] added shiftit key * [refactor(crkbd)] added shiftit key * [chore(crkbd)] adding SLEEP_LED_ENABLE on rules.mk * [refactor(crkbd)] added keylog & removed static rainbow RGB * [feat(crkbd)] introduced em-dash '—' keymap * [feat(crkbd)] added screenshot functionality * [refactor(lily58,pinky3)] moving media keys * [refactor(lily58)] Added emdash key * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore(crkbd,lily48)] Updating README.md * [feat] added K_LAPP & K_RAPP to mimic command + tab * [feat] added K_LAPP & K_RAPP to mimic command + tab * [fix(#6797)] resolving changes requested by @drashna * [fix(#6797)] first cut on using QMK OLED Driver * [fix(#6797)] cleaning up rules.mk * [fix(#6797)] making scrolling logo work * [fix(#6797)] Using OLED Driver for Lily58 * [fix(#6797)] Moved OLED driver implementation to ninjonas userspace * [fix(#6797)] Bringing back crkbd & lily58 logos * [fix(#6797)] Turning off OLED based off @drashna's workaround in #5982 * [fix(#6797)] whoops! forgot to checkin crkbd/config.h * [fix(#6797)] fixing issue with OLED randomly turning on * [fix(#6797)] using default glcdfont.c for lily58 & crkbd * [fix(#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review * [fix(#6797)] updating M_MALL macro as per code review by @fauxpark
2019-09-26 04:28:06 +00:00
}