jonavin.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* Copyright 2021 Jonavin Eng @Jonavin
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #pragma once
  14. // DEFINE MACROS
  15. #define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0])
  16. // LAYERS
  17. enum custom_user_layers {
  18. _BASE,
  19. _FN1,
  20. _LOWER,
  21. _RAISE,
  22. };
  23. // KEYCODES
  24. enum custom_user_keycodes {
  25. KC_00 = SAFE_RANGE,
  26. ENCFUNC,
  27. KC_WINLCK, //Toggles Win key on and off
  28. RGB_TOI, // Timeout idle time up
  29. RGB_TOD, // Timeout idle time down
  30. };
  31. #define KC_CAD LALT(LCTL(KC_DEL))
  32. #define KC_AF4 LALT(KC_F4)
  33. #define KC_TASK LCTL(LSFT(KC_ESC))
  34. #ifdef TD_LSFT_CAPSLOCK_ENABLE
  35. // Tap Dance Definitions
  36. enum custom_tapdance {
  37. TD_LSFT_CAPSLOCK,
  38. TD_LSFT_CAPS_WIN
  39. };
  40. #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK)
  41. #define KC_LSFTCAPSWIN TD(TD_LSFT_CAPS_WIN)
  42. #else // regular Shift
  43. #define KC_LSFTCAPS KC_LSFT
  44. #endif // TD_LSFT_CAPSLOCK_ENABLE
  45. #ifdef RGB_MATRIX_ENABLE
  46. //RGB custom colours
  47. #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps
  48. #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Nautilus Font colours
  49. #endif
  50. // IDLE TIMEOUTS
  51. #ifdef IDLE_TIMEOUT_ENABLE
  52. #define TIMEOUT_THRESHOLD_DEFAULT 5 // default timeout minutes
  53. #define TIMEOUT_THRESHOLD_MAX 140 // upper limits (2 hours and 10 minutes -- no rgb indicators above this value)
  54. //prototype functions
  55. uint16_t get_timeout_threshold(void);
  56. void timeout_reset_timer(void);
  57. void timeout_update_threshold(bool increase);
  58. void timeout_tick_timer(void);
  59. #endif //IDLE_TIMEOUT_ENABLE
  60. // OTHER FUNCTION PROTOTYPE
  61. void activate_numlock(bool turn_on);