summaryrefslogtreecommitdiff
path: root/users/nstickney
diff options
context:
space:
mode:
Diffstat (limited to 'users/nstickney')
-rw-r--r--users/nstickney/config.h63
-rw-r--r--users/nstickney/nstickney.c112
-rw-r--r--users/nstickney/nstickney.h46
-rw-r--r--users/nstickney/readme.md49
-rw-r--r--users/nstickney/rules.mk35
-rw-r--r--users/nstickney/unicodemap.h106
6 files changed, 364 insertions, 47 deletions
diff --git a/users/nstickney/config.h b/users/nstickney/config.h
new file mode 100644
index 0000000000..b853038c21
--- /dev/null
+++ b/users/nstickney/config.h
@@ -0,0 +1,63 @@
+/* Copyright 2021 @nstickney
+ *
+ * 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/>.
+ */
+
+// Changes from Bastyl defaults
+#ifdef MASTER_RIGHT
+# undef MASTER_RIGHT
+#endif
+
+// Turn off RGB lights when computer is sleeping
+#define RGBLIGHT_SLEEP
+
+// https://beta.docs.qmk.fm/developing-qmk/qmk-reference/config_options#features-that-can-be-disabled
+#define NO_ACTION_ONESHOT
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+// Turn off all possible RGB animations
+#ifdef RGB_ANIMATIONS
+# undef RGB_ANIMATIONS
+#endif
+#ifdef RGB_EFFECT_ALTERNATING
+# undef RGB_EFFECT_ALTERNATING
+#endif
+#ifdef RGB_EFFECT_BREATHING
+# undef RGB_EFFECT_BREATHING
+#endif
+#ifdef RGB_EFFECT_CHRISTMAS
+# undef RGB_EFFECT_CHRISTMAS
+#endif
+#ifdef RGB_EFFECT_KNIGHT
+# undef RGB_EFFECT_KNIGHT
+#endif
+#ifdef RGB_EFFECT_RAINBOW_MOOD
+# undef RGB_EFFECT_RAINBOW_MOOD
+#endif
+#ifdef RGB_EFFECT_RAINBOW_SWIRL
+# undef RGB_EFFECT_RAINBOW_SWIRL
+#endif
+#ifdef RGB_EFFECT_RGB_TEST
+# undef RGB_EFFECT_RGB_TEST
+#endif
+#ifdef RGB_EFFECT_SNAKE
+# undef RGB_EFFECT_SNAKE
+#endif
+#ifdef RGB_EFFECT_STATIC_GRADIENT
+# undef RGB_EFFECT_STATIC_GRADIENT
+#endif
+#ifdef RGB_EFFECT_TWINKLE
+# undef RGB_EFFECT_TWINKLE
+#endif
diff --git a/users/nstickney/nstickney.c b/users/nstickney/nstickney.c
index 3e18e5c838..8222e7289d 100644
--- a/users/nstickney/nstickney.c
+++ b/users/nstickney/nstickney.c
@@ -1,34 +1,73 @@
+/* Copyright 2021 @nstickney
+ *
+ * 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 "nstickney.h"
// Tap Dancing
-void dance_layer (qk_tap_dance_state_t *state, void *user_data) {
- switch (state -> count) {
- case 1: tap_code(KC_APP); break;
- case 2: layer_invert(NUMP); break;
- case 3: layer_invert(SYMB); break;
- case 4: layer_invert(SYSH); break;
- default: break;
- }
+void dance_layer(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ tap_code(KC_APP);
+ break;
+ case 2:
+ layer_invert(NUMP);
+ break;
+ case 3:
+ layer_invert(SYMB);
+ break;
+ default:
+ break;
+ }
};
-void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) {
- switch (state->count) {
- case 1: register_code(KC_LGUI); break;
- case 2: register_code(KC_NLCK); break;
- case 3: register_code(KC_CAPS); break;
- case 4: register_code(KC_SLCK); break;
- default: break;
- }
+void dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ register_code(KC_LGUI);
+ break;
+ case 2:
+ register_code(KC_NLCK);
+ break;
+ case 3:
+ register_code(KC_CAPS);
+ break;
+ case 4:
+ register_code(KC_SLCK);
+ break;
+ default:
+ break;
+ }
};
-void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) {
- switch (state->count) {
- case 1: unregister_code(KC_LGUI); break;
- case 2: unregister_code(KC_NLCK); break;
- case 3: register_code(KC_CAPS); break;
- case 4: register_code(KC_SLCK); break;
- default: break;
- }
+void dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ unregister_code(KC_LGUI);
+ break;
+ case 2:
+ register_code(KC_NLCK);
+ break;
+ case 3:
+ register_code(KC_CAPS);
+ break;
+ case 4:
+ register_code(KC_SLCK);
+ break;
+ default:
+ break;
+ }
};
qk_tap_dance_action_t tap_dance_actions[] = {
@@ -36,9 +75,22 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};
-void eeconfig_init_user (void) {
- set_unicode_input_mode(UC_LNX); // Linux
- //set_unicode_input_mode(UC_OSX); // Mac OSX
- //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
- //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
-}; \ No newline at end of file
+// RGB underglow per-layer hue values
+const uint16_t LAYER_HUE[] = {6, 197, 133, 69};
+
+// Initialize RGB underglow (colorful)
+void keyboard_post_init_user(void) {
+ rgblight_enable_noeeprom();
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ for (uint16_t i = 0; i < 256; ++i) {
+ rgblight_sethsv_noeeprom((i + LAYER_HUE[BASE]) % 256, 255, 136);
+ wait_ms(8);
+ }
+};
+
+// Turn on RGB underglow according to active layer
+layer_state_t layer_state_set_user(layer_state_t state) {
+ uint8_t user_val = rgblight_get_val();
+ rgblight_sethsv_noeeprom(LAYER_HUE[get_highest_layer(state)], 255, user_val);
+ return state;
+};
diff --git a/users/nstickney/nstickney.h b/users/nstickney/nstickney.h
index d3f5a7c6fc..2b596b25e5 100644
--- a/users/nstickney/nstickney.h
+++ b/users/nstickney/nstickney.h
@@ -1,20 +1,22 @@
-#include QMK_KEYBOARD_H
-
+/* Copyright 2021 @nstickney
+ *
+ * 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/>.
+ */
#pragma once
-#define USE_SERIAL
-#define MASTER_LEFT
-
-#undef UNICODE_SELECTED_MODES
-#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC
-
-// Layers
-#define BASE 0 // Base layer
-#define SYMB 1 // Symbols
-#define SYSH 2 // Symbols, shifted
-#define NUMP 3 // Numpad
-#define FCTN 4 // Function
+#include QMK_KEYBOARD_H
-// Make keymaps more clear
+// Specialty keycodes
#define CC_ESC LCTL_T(KC_ESC)
#define CC_QUOT RCTL_T(KC_QUOT)
#define AC_SLSH LALT_T(KC_SLSH)
@@ -22,4 +24,16 @@
#define FC_BSLS LT(FCTN, KC_BSLS)
#define FC_MINS LT(FCTN, KC_MINS)
-enum tap_dances {LOCKS = 0, LAYERS = 1}; \ No newline at end of file
+// Layers
+enum {
+ BASE, // Base layer
+ SYMB, // Symbols
+ NUMP, // Numpad
+ FCTN // Function
+};
+
+// Tap dance
+enum {
+ LOCKS, // Activate NUM/CAPS/SCROLL lock
+ LAYERS // Activate NUMP and SYMB layers
+};
diff --git a/users/nstickney/readme.md b/users/nstickney/readme.md
new file mode 100644
index 0000000000..b62264d687
--- /dev/null
+++ b/users/nstickney/readme.md
@@ -0,0 +1,49 @@
+# nstickney's Ortholinear Layout
+
+ > Familiar layout for users who regularly switch between Bastyl/Iris and standard QWERTY.
+
+## Install
+
+For instructions on building and installing this keymap, see the [docs](https://docs.qmk.fm/#/getting_started_make_guide).
+Below is the command for me; it may be different for you.
+Note that my Iris keyboard has an Elite-C on the left half and a ProMicro on the right half.
+
+- Bastyl: `make hidtech/bastyl:nstickney:dfu`
+- Iris
+ - Elite-C: `make keebio/iris/rev2:nstickney:dfu`
+ - ProMicro: `make keebio/iris/rev2:nstickney:avrdude`
+
+## Usage
+
+0. QWERTY `BASE` layer.
+ * `/`, `\`, `[SPACE]`, `[ENTER]`, `-`, and `=` on the thumb clusters.
+ * `[` and `]` added on Bastyl.
+ * `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`.
+ * `'` can also be held for `CTRL`.
+ * [Space-Cadet Shift](https://beta.docs.qmk.fm/using-qmk/advanced-keycodes/feature_space_cadet) is enabled, so the `SHIFT` keys send `(` and `)` when tapped.
+ * Hold down `/` or `=` for `ALT`.
+ * Hold down `\` or `-` to access the functions layer.
+ * Farthest thumb keys are `GUI` (left) and `MENU` (right).
+ * Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively.
+ * Tapping `MENU` 2 or 3 times will toggle the `NUMP` and `SYMB` layers, respectively.
+0. Unicode-input symbols on `SYMB` layer. Based (loosely) on US-International layout.
+0. `NUMP` layer has number pads on each hand. Number pad `7`-`8`-`9` align with QWERTY `7`-`8`-`9` on right hand.
+0. Function, arrow, media, and miscellaneous keys on `FCTN` layer.
+ * `F1` through `F10` on `1`-`10`. `F11` is on `GUI` and `F12` is on `MENU`.
+ * Brackets (`[` and `]`) available on `U` and `I`; braces (`{` and `}`) on `O` and `P`.
+ * Arrow keys on `ESDF` and `HJKL`; familiar for both Vim users and FPS gamers.
+ * `W` is `HOME`; `R` is `END`. `T` is `PAGE UP` and `G` is `PAGE DOWN`.
+ * Music controls on lower row of left hand.
+ * Volume and screen brightness on lower row of right hand.
+ * `PRINT SCREEN`, `PAUSE`, `SYSREQ`, `INSERT`, and `CLEAR` also mapped, as intelligently as possible.
+ * `Q` toggles the RGB underglow (which changes color to indicate active layer).
+ * `A` increases RGB underglow brightness (with `SHIFT`, decreases brightness).
+ * `Y` is mapped to [`KC_LOCK`](https://beta.docs.qmk.fm/using-qmk/software-features/feature_key_lock).
+
+## Contribute
+
+If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls).
+
+## License
+
+Copyright &copy; 2016-2021 @nstickney. Released under [GPL-2.0](/LICENSE).
diff --git a/users/nstickney/rules.mk b/users/nstickney/rules.mk
index f52371c791..0f189e8a4f 100644
--- a/users/nstickney/rules.mk
+++ b/users/nstickney/rules.mk
@@ -1,4 +1,37 @@
+# Copyright 2021 @nstickney
+#
+# 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/>.
SRC += nstickney.c
+KEY_LOCK_ENABLE = yes
+RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE = yes
-UNICODE_ENABLE = yes \ No newline at end of file
+UNICODE_ENABLE = no
+UNICODEMAP_ENABLE = yes
+UCIS_ENABLE = no
+
+# https://github.com/qmk/qmk_firmware/issues/3224#issuecomment-399769416
+LTO_ENABLE = yes
+
+# https://beta.docs.qmk.fm/developing-qmk/qmk-reference/getting_started_make_guide#rules-mk-options
+API_SYSEX_ENABLE = no
+AUDIO_ENABLE = no
+BOOTMAGIC_ENABLE = no
+COMMAND_ENABLE = no
+CONSOLE_ENABLE = no
+MOUSEKEY_ENABLE = no
+MIDI_ENABLE = no
+NKRO_ENABLE = no
+SLEEP_LED_ENABLE = no
+VARIABLE_TRACE = no
diff --git a/users/nstickney/unicodemap.h b/users/nstickney/unicodemap.h
new file mode 100644
index 0000000000..3b7d9e3053
--- /dev/null
+++ b/users/nstickney/unicodemap.h
@@ -0,0 +1,106 @@
+/* Copyright 2021 @nstickney
+ *
+ * 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/>.
+ */
+#pragma once
+
+enum {
+ // Used on base
+
+ // Used on US-International
+ IEX, SS2, SS3, CUR, EUR, V14, V12, V34, LSQ, RSQ, YEN, MLT,
+ A_D, A_R, E_A, REG, THR, U_D, U_A, I_A, O_A, O_D, LDA, RDA, NOT,
+ A_A, S_S, ETH, EMD, OEL, O_S, PLC, ACT,
+ AEL, CPR, N_T, MCR, C_C, IQM,
+
+ // Used on US-International with Shift
+ SS1, GBP, DIV,
+ AXD, ACR, ECA, UCD, UCA, ICA, OCA, OCD, BKB,
+ ACA, SEC, ETC, OEC, OCS, DEG, DIS,
+ AEC, CNT, NCT, CCC,
+
+ // Added to US-International
+
+ // Added to US-International with Shift
+ LDQ, RDQ,
+ CPL
+};
+
+const uint32_t PROGMEM unicode_map[] = {
+ [IEX] = 0xA1, // ¡
+ [SS2] = 0xB2, // ²
+ [SS3] = 0xB3, // ³
+ [CUR] = 0xA4, // ¤
+ [EUR] = 0x20AC, // €
+ [V14] = 0xBC, // ¼
+ [V12] = 0xBD, // ½
+ [V34] = 0xBE, // ¾
+ [LSQ] = 0x2018, // ‘
+ [RSQ] = 0x2019, // ’
+ [YEN] = 0xA5, // ¥
+ [MLT] = 0xD7, // ×
+ [A_D] = 0xE4, // ä
+ [A_R] = 0xE5, // å
+ [E_A] = 0xE9, // é
+ [REG] = 0xAE, // ®
+ [THR] = 0xFE, // þ
+ [U_D] = 0xFC, // ü
+ [U_A] = 0xFA, // ú
+ [I_A] = 0xED, // í
+ [O_A] = 0xF3, // ó
+ [O_D] = 0xF6, // ö
+ [LDA] = 0xAB, // «
+ [RDA] = 0xBB, // »
+ [NOT] = 0xAC, // ¬
+ [A_A] = 0xE1, // á
+ [S_S] = 0xDF, // ß
+ [ETH] = 0xF0, // ð
+ [EMD] = 0x2014, // —
+ [OEL] = 0x153, // œ
+ [O_S] = 0xF8, // ø
+ [PLC] = 0xB6, // ¶
+ [ACT] = 0xB4, // ´
+ [AEL] = 0xE6, // æ
+ [CPR] = 0xA9, // ©
+ [N_T] = 0xF1, // ñ
+ [MCR] = 0xB5, // µ
+ [C_C] = 0xE7, // ç
+ [IQM] = 0xBF, // ¿
+ [SS1] = 0xB9, // ¹
+ [GBP] = 0xA3, // £
+ [DIV] = 0xF7, // ÷
+ [AXD] = 0xC4, // Ä
+ [ACR] = 0xC5, // Å
+ [ECA] = 0xC9, // É
+ [UCD] = 0xDC, // Ü
+ [UCA] = 0xDA, // Ú
+ [ICA] = 0xCD, // Í
+ [OCA] = 0xD3, // Ó
+ [OCD] = 0xD6, // Ö
+ [BKB] = 0xA6, // ¦
+ [ACA] = 0xC1, // Á
+ [SEC] = 0xA7, // §
+ [ETC] = 0xD0, // Ð
+ [OEC] = 0x152, // Œ
+ [OCS] = 0xD8, // Ø
+ [DEG] = 0xB0, // °
+ [DIS] = 0xA8, // ¨
+ [AEC] = 0xC6, // Æ
+ [CNT] = 0xA2, // ¢
+ [NCT] = 0xD1, // Ñ
+ [CCC] = 0xC7, // Ç
+ [LDQ] = 0x201C, // “
+ [RDQ] = 0x201D, // ”
+ [CPL] = 0x1F12F // 🄯
+};