Skip to content

Commit

Permalink
added more spotlight search macros
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-porras committed Apr 6, 2018
1 parent bddf64e commit 6d99ac1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
27 changes: 17 additions & 10 deletions keyboards/lets_split/keymaps/normacos/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ enum custom_keycodes {
SH_GOUP,
SH_TERM,
SPOT,
SLACK
SLACK,
OUTLOOK,
CHROME
};

// Fillers (to make layering more clear)
Expand Down Expand Up @@ -71,21 +73,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | / | * |SftEnt|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Lock | Home | End | Alt | Lower| GUI | | 0 | Raise| . | | | |
* | Lock | Home | End | Alt | Lower| GUI | | 0 | Raise| . | Spot |Chrome| |
* `-----------------------------------------' `-----------------------------------------'
*/
[_LOWER] = KEYMAP( \
_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PEQL, XXXXXXX, _______, \
_______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS, KC_DEL, \
_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PAST, _______, \
_______, _______, _______, _______, _______, _______, KC_P0, _______, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX
_______, _______, _______, _______, _______, _______, KC_P0, _______, KC_PDOT, SPOT, CHROME, XXXXXXX
),

/* Raise
* ,-----------------------------------------. ,-----------------------------------------.
* | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CtlEsc| Sudo | UpDir| Slack| Term | Spot | | = | - | \ | [ | ] | ` |
* |CtlEsc| Sudo | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -94,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_RAISE] = KEYMAP( \
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
_______, SH_SUDO, SH_GOUP, SLACK, SH_TERM, SPOT, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \
_______, SH_SUDO, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \
_______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
Expand Down Expand Up @@ -149,20 +151,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_on(_ADJUST);
return false;
case SH_SUDO:
SEND_STRING("sudo !!"SS_TAP(X_ENTER)); // Elevate last command
SEND_STRING("sudo !!"SS_TAP(X_ENTER)); // Elevate last command
return false;
case SH_GOUP:
SEND_STRING("cd .."SS_TAP(X_ENTER)); // Go up a directory
SEND_STRING("cd .."SS_TAP(X_ENTER)); // Go up a directory
return false;
case SH_TERM:
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"Terminal"SS_TAP(X_ENTER)); // Open Terminal
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"terminal"SS_TAP(X_ENTER)); // Open Terminal
return false;
case SPOT:
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"Spotify"SS_TAP(X_ENTER)); // Open Spotify
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"spotify app"SS_TAP(X_ENTER)); // Open Spotify
return false;
case SLACK:
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"Slack"SS_TAP(X_ENTER)); // Open Slack
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"slack"SS_TAP(X_ENTER)); // Open Slack
return false;
case OUTLOOK:
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"outlook"SS_TAP(X_ENTER)); // Open Outlook
return false;
case CHROME:
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"chrome"SS_TAP(X_ENTER)); // Open Chrome
}
} else {
switch(keycode) {
Expand Down
6 changes: 4 additions & 2 deletions keyboards/lets_split/keymaps/normacos/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Macros:
- Slack opens Slack through Spotlight Search
- Term opens Terminal through Spotlight Search
- Spot opens Spotify through Spotlight Search
- Chrome opesn Chrome through Spotlight Search
- OutLk opens Microsoft Outlook through Spotlight Search
- ScnSht allows the user to take a screenshot of a selected portion of the screen
- ClrHom clears Terminal line from beginning of line up to cursor
- ClrEnd clears Terminal line from cursor up to end of line
Expand Down Expand Up @@ -49,7 +51,7 @@ Any and all empty keys shown below are will be set in the future, and do nothing
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Shift| F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | / | * |SftEnt|
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Lock | Home | End | Alt | Lower| GUI | | 0 | Raise| . | | | |
| Lock | Home | End | Alt | Lower| GUI | | 0 | Raise| . | Spot |Chrome| |
`-----------------------------------------' `-----------------------------------------'
```

Expand All @@ -60,7 +62,7 @@ Any and all empty keys shown below are will be set in the future, and do nothing
,-----------------------------------------. ,-----------------------------------------.
| Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|CtlEsc| Sudo | UpDir| Slack| Term | Spot | | = | - | \ | [ | ] | ` |
|CtlEsc| Sudo | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt|
|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand Down

0 comments on commit 6d99ac1

Please sign in to comment.