https://github.com/moyum/my-hammerspoon-config
my hammerspoon config
https://github.com/moyum/my-hammerspoon-config
Last synced: 4 months ago
JSON representation
my hammerspoon config
- Host: GitHub
- URL: https://github.com/moyum/my-hammerspoon-config
- Owner: MoYuM
- Created: 2021-12-07T09:58:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T02:35:42.000Z (over 1 year ago)
- Last Synced: 2025-06-15T14:17:40.576Z (about 1 year ago)
- Language: Lua
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My hammerspoon config
My personal hotkey configuration, maked by Hammerspoon and Karabiner.
This is a substitute for capslox(becasue capslox is nolonger free).
## Usage
1. use Karabiner bind capslock to F17
2. copy all file to `~/.hammerspoon`
## Hotkey
config already have a set of keys remap, and you can add new key remap in `keys.lua`.
```lua
{
-- remap alt + right to capslock + P
from = { { 'alt' }, 'right' },
to = 'P',
-- can hold the key to repeat
canRepeat = true,
}
```
the remap hotkeys that I already set:
| hotkey | function |
| ----------------- | ---------------------------------------------------------- |
| capslock | toggle input method between ABC and Chinese |
| hold capslock | do nothing |
| capslock + S | left |
| capslock + D | down |
| capslock + F | right |
| capslock + E | up |
| capslock + I | alt + up |
| capslock + K | alt + down |
| capslock + J | alt + left |
| capslock + ; | cmd + right(move to the end of line) |
| capslock + \ | esc |
| capslock + return | move to a new line |
| capslock + ] | shift + ctrl + - (goforward in vscode) |
| capslock + [ | ctrl + - (goback in vscode) |
| capslock + T | show time |
| capslock + M | delete a word before cursor |
| capslock + O | select the word on the left side of the cursor and copy it |
## Auto Switch Imput Method
You can auto switch input method when you focus application or change space, customiza the config in `watcher.lua`.
## Caffeine
I use [Caffeine Spoon](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Caffeine.spoon.zip) to prevent system sleep.
Click the caffe icon in menubar to switch it.