1 /* Copyright 2017 Wunder
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.
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.
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/>.
17 #include "action_layer.h"
20 enum custom_keycodes {
36 #define KC_RASE MO(_RAISE)
37 #define KC_LOWR MO(_LOWER)
39 // RGB and Backlighting
40 #define KC_RGB RGB_TOG
41 #define KC_RHUI RGB_HUI
42 #define KC_RHUD RGB_HUD
43 #define KC_RSAI RGB_SAI
44 #define KC_RSAD RGB_SAD
45 #define KC_RVAI RGB_VAI
46 #define KC_RVAD RGB_VAD
47 #define KC_BLT BL_TOGG
48 #define KC_BLS BL_STEP
53 //#define KC_EXC TD(TD_ESC)
54 #define KC_LOCK TD(TD_LOCK)
61 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
63 [_QWERTY] = KC_KEYMAP(
64 // .--------------------------------------------------------------------------.
65 ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC,
66 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
67 TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT,
68 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
69 LCTL, A , S , D , F , G ,HOME,PLUS,LOCK, H , J , K , L ,SCLN, ENT,
70 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
71 LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT,
72 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
73 LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT
74 // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
78 // .--------------------------------------------------------------------------.
79 ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____,
80 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
81 ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____,
82 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
83 ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____,
84 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
85 ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE,
86 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
87 ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT
88 // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
92 // .--------------------------------------------------------------------------.
93 ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____,
94 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
95 ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____,
96 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
97 CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____,
98 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
99 RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____,
100 // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
101 ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R
102 // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
106 qk_tap_dance_action_t tap_dance_actions[] = {
107 //Tap once for left ctrl, twice for ESC
108 //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC),
109 [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L))
111 void led_set_user(uint8_t usb_led) {
112 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
120 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
121 if (record->event.pressed) {
124 SEND_STRING("sudo su -\n");
127 SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n");
130 SEND_STRING("ps -ef | grep ");