mattly.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* Copyright 2019 Matthew Lyon
  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. #ifndef USERSPACE
  17. #define USERSPACE
  18. #include "quantum.h"
  19. enum {
  20. _QWERTY,
  21. _NAVNUM,
  22. _SYMBOL,
  23. _FUNCT,
  24. };
  25. // left hand
  26. #define ESC_HYP MT(MOD_HYPR, KC_ESC)
  27. #define BSP_NUM LT(_NAVNUM, KC_BSPC)
  28. #define ENT_SFT MT(MOD_LSFT, KC_ENT)
  29. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  30. // right hand
  31. #define SPC_SFT MT(MOD_LSFT, KC_SPC)
  32. #define TAB_SYM LT(_SYMBOL, KC_TAB)
  33. #define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL)
  34. #define NAVLOCK TG(_NAVNUM)
  35. #define SYMLOCK TG(_SYMBOL)
  36. // QWERTY
  37. #define A_CTRL MT(MOD_LCTL, KC_A)
  38. #define S_ALT MT(MOD_LALT, KC_S)
  39. #define D_GUI MT(MOD_LGUI, KC_D)
  40. #define F_SHFT MT(MOD_LSFT, KC_F)
  41. #define J_SHFT MT(MOD_RSFT, KC_J)
  42. #define K_GUI MT(MOD_RGUI, KC_K)
  43. #define L_ALT MT(MOD_RALT, KC_L)
  44. #define MINSCTL MT(MOD_RCTL, KC_MINS)
  45. #define BWORD LALT(KC_LEFT)
  46. #define FWORD LALT(KC_RIGHT)
  47. // OS X default keys
  48. #define NWIN LGUI(KC_GRV) // Next Window
  49. #define PWIN LGUI(LSFT(KC_GRV)) // Prev Window
  50. #define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab
  51. #define PTAB LGUI(LSFT(KC_LBRC)) // Prev Tab
  52. #define NAVBACK LGUI(KC_LBRC) // Navigate Forward
  53. #define NAVFWD LGUI(KC_RBRC) // Navigate Back
  54. // my personal mappings to window manager commands
  55. #define XALLWIN HYPR(KC_F14)
  56. #define XDESKTP HYPR(KC_F15)
  57. #define XNXTSPC HYPR(KC_F16)
  58. #define XPRVSPC HYPR(KC_F17)
  59. #define XNOTIFY HYPR(KC_F18)
  60. #ifdef RGBLIGHT_ENABLE
  61. #define HSV_CAPS 42, 255, 255
  62. #define HSV_DEFAULT 30, 218, 255
  63. #define HSV_SYMBOL 22, 255, 255
  64. #define HSV_NAVNUM 245, 200, 255
  65. #define HSV_FUNCT 233, 255, 255
  66. #define HSV_RESET 180, 255, 255
  67. #endif
  68. #endif