You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
2.5 KiB

  1. /* Copyright 2020 Guillaume Gérard
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include QMK_KEYBOARD_H
  18. #include "keymap_helpers.h"
  19. #ifdef TAP_DANCE_ENABLE
  20. # include "tap_dances.h"
  21. #endif
  22. #ifdef RGBLIGHT_ENABLE
  23. # include "underglow.h"
  24. #endif
  25. #ifdef LAYER_FN
  26. # include "fn.h"
  27. #endif
  28. #ifdef LAYER_GAME
  29. # include "game.h"
  30. #endif
  31. #ifdef LAYER_GIT
  32. # include "git.h"
  33. #endif
  34. #ifdef LAYERS_ORTHO
  35. # include "ortho.h"
  36. #endif
  37. #ifdef LAYERS_PROGRAMMER
  38. # include "programmer.h"
  39. #endif
  40. typedef union {
  41. uint32_t raw;
  42. struct {
  43. #ifdef RGBLIGHT_ENABLE
  44. bool rgb_layer_change : 1;
  45. #endif
  46. };
  47. } user_config_t;
  48. enum layers {
  49. _QWERTY,
  50. _WORKMAN,
  51. _COLEMAK,
  52. _DVORAK,
  53. #ifdef LAYER_GAME
  54. _GAME,
  55. #endif
  56. #ifdef LAYERS_PROGRAMMER
  57. _QWERTY_PROGRAMMER,
  58. _WORKMAN_PROGRAMMER,
  59. _COLEMAK_PROGRAMMER,
  60. _DVORAK_PROGRAMMER,
  61. _PROGRAMMER_SHIFTED,
  62. #endif
  63. #ifdef LAYERS_ORTHO
  64. _LOWER,
  65. _RAISE,
  66. _ADJUST,
  67. #endif
  68. #ifdef LAYER_FN
  69. _FN,
  70. #endif
  71. #ifdef LAYER_GIT
  72. _GIT,
  73. #endif
  74. };
  75. enum keycodes {
  76. // Persistent layers switcher keys
  77. QWERTY = SAFE_RANGE,
  78. WORKMAN,
  79. COLEMAK,
  80. DVORAK,
  81. #ifdef LAYER_GAME
  82. GAME,
  83. #endif
  84. #ifdef LAYERS_PROGRAMMER
  85. // Workman Programmer
  86. QWERTY_PROGRAMMER,
  87. WORKMAN_PROGRAMMER,
  88. COLEMAK_PROGRAMMER,
  89. DVORAK_PROGRAMMER,
  90. PROGRAMMER_SHIFTED,
  91. PG_GRV,
  92. PG_1,
  93. PG_2,
  94. PG_3,
  95. PG_4,
  96. PG_5,
  97. PG_6,
  98. PG_7,
  99. PG_8,
  100. PG_9,
  101. PG_0,
  102. #endif
  103. // RGB Underglow lights based on the layer key
  104. RGB_LAYER,
  105. #ifdef LAYER_GIT
  106. // GIT commands
  107. GIT_ADD,
  108. GIT_BRANCH,
  109. GIT_CHECKOUT,
  110. GIT_CHERRYPICK,
  111. GIT_COMMIT,
  112. GIT_DIFF,
  113. GIT_FETCH,
  114. GIT_GREP,
  115. GIT_LOG,
  116. GIT_INIT,
  117. GIT_MV,
  118. GIT_MERGE,
  119. GIT_PUSH,
  120. GIT_PULL,
  121. GIT_REBASE,
  122. GIT_REMOTE,
  123. GIT_RESET,
  124. GIT_SHOW,
  125. GIT_STASH,
  126. GIT_STATUS,
  127. GIT_TAG
  128. #endif
  129. };
  130. #define RGB_LYR RGB_LAYER