aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorjonavin <71780717+Jonavin@users.noreply.github.com>2021-09-01 23:42:31 -0400
committerGitHub <noreply@github.com>2021-09-01 20:42:31 -0700
commitb6ca21c65c0d32241ed697072292bd5118b64f9a (patch)
tree396968fab42790ca62bdfb054aff9fc88a984aca /users
parentcded3b75821547cd69614ab8b4a71417b6fa4bcb (diff)
downloadqmk_firmware-b6ca21c65c0d32241ed697072292bd5118b64f9a.tar.gz
qmk_firmware-b6ca21c65c0d32241ed697072292bd5118b64f9a.zip
[Keymap] Jonavin keymap gmmk pro (#14220)
add rgb nightmode and optional colemak layer Co-authored-by: Jonavin <=>
Diffstat (limited to 'users')
-rw-r--r--users/jonavin/jonavin.c24
-rw-r--r--users/jonavin/jonavin.h5
-rw-r--r--users/jonavin/rules.mk3
3 files changed, 30 insertions, 2 deletions
diff --git a/users/jonavin/jonavin.c b/users/jonavin/jonavin.c
index d5fdb2a1e..bd6c55e9f 100644
--- a/users/jonavin/jonavin.c
+++ b/users/jonavin/jonavin.c
@@ -45,6 +45,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
45 }; 45 };
46#endif // TD_LSFT_CAPSLOCK_ENABLE 46#endif // TD_LSFT_CAPSLOCK_ENABLE
47 47
48// RGB NIGHT MODE
49#ifdef RGB_MATRIX_ENABLE
50 static bool rgb_nightmode = false;
51
52 // Turn on/off NUM LOCK if current state is different
53 void activate_rgb_nightmode (bool turn_on) {
54 if (rgb_nightmode != turn_on) {
55 rgb_nightmode = !rgb_nightmode;
56 }
57 }
58
59 bool get_rgb_nightmode(void) {
60 return rgb_nightmode;
61 }
62#endif // RGB_MATRIX_ENABLE
63
48// TIMEOUTS 64// TIMEOUTS
49#ifdef IDLE_TIMEOUT_ENABLE 65#ifdef IDLE_TIMEOUT_ENABLE
50 static uint16_t timeout_timer = 0; 66 static uint16_t timeout_timer = 0;
@@ -192,7 +208,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
192 } else unregister_code16(keycode); 208 } else unregister_code16(keycode);
193 break; 209 break;
194#endif // IDLE_TIMEOUT_ENABLE 210#endif // IDLE_TIMEOUT_ENABLE
195 211#ifdef RGB_MATRIX_ENABLE
212 case RGB_NITE:
213 if(record->event.pressed) {
214 rgb_nightmode = !rgb_nightmode;
215 } else unregister_code16(keycode);
216 break;
217#endif // RGB_MATRIX_ENABLE
196 default: 218 default:
197 if (record->event.pressed) { 219 if (record->event.pressed) {
198 #ifdef RGB_MATRIX_ENABLE 220 #ifdef RGB_MATRIX_ENABLE
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h
index 894feddfd..5f467bc84 100644
--- a/users/jonavin/jonavin.h
+++ b/users/jonavin/jonavin.h
@@ -36,6 +36,7 @@ enum custom_user_keycodes {
36 KC_WINLCK, //Toggles Win key on and off 36 KC_WINLCK, //Toggles Win key on and off
37 RGB_TOI, // Timeout idle time up 37 RGB_TOI, // Timeout idle time up
38 RGB_TOD, // Timeout idle time down 38 RGB_TOD, // Timeout idle time down
39 RGB_NITE // Turns off all rgb but allow rgb indicators to work
39}; 40};
40 41
41#define KC_CAD LALT(LCTL(KC_DEL)) 42#define KC_CAD LALT(LCTL(KC_DEL))
@@ -57,11 +58,13 @@ enum custom_user_keycodes {
57#endif // TD_LSFT_CAPSLOCK_ENABLE 58#endif // TD_LSFT_CAPSLOCK_ENABLE
58 59
59 60
60
61#ifdef RGB_MATRIX_ENABLE 61#ifdef RGB_MATRIX_ENABLE
62//RGB custom colours 62//RGB custom colours
63 #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps 63 #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps
64 #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Nautilus Font colours 64 #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Nautilus Font colours
65
66 void activate_rgb_nightmode (bool turn_on);
67 bool get_rgb_nightmode(void);
65#endif 68#endif
66 69
67 70
diff --git a/users/jonavin/rules.mk b/users/jonavin/rules.mk
index 4e9ee08ff..e2918d9e2 100644
--- a/users/jonavin/rules.mk
+++ b/users/jonavin/rules.mk
@@ -11,3 +11,6 @@ endif
11ifeq ($(strip $(STARTUP_NUMLOCK_ON)), yes) 11ifeq ($(strip $(STARTUP_NUMLOCK_ON)), yes)
12 OPT_DEFS += -DSTARTUP_NUMLOCK_ON 12 OPT_DEFS += -DSTARTUP_NUMLOCK_ON
13endif 13endif
14ifeq ($(strip $(COLEMAK_LAYER_ENABLE)), yes)
15 OPT_DEFS += -DCOLEMAK_LAYER_ENABLE
16endif