4.0 KiB
Hammerspoon Configuration
Usage
- Install Hammerspoon
git clone https://github.com/sugood/hammerspoon.git ~/.hammerspoon
- Detailed description
Modifier keys
Key | |
---|---|
⇧ | Shift |
⌃ | Control |
⌥ | Option |
⌘ | Command |
Reference code
https://github.com/greyby/hammerspoon
Language
Features
Window Management
Split Screen Actions
- ⌃⌥⌘ + ← Left half
- ⌃⌥⌘ + → Right half
- ⌃⌥⌘ + ↑ Top half
- ⌃⌥⌘ + ↓ Bottom half
Quarter Screen Actions
- ⌃⌥⇧ + ← Left top quarter
- ⌃⌥⇧ + → Right bottom quarter
- ⌃⌥⇧ + ↑ Right top quarter
- ⌃⌥⇧ + ↓ Left bottom quarter
Multiple Monitor
Move Cursor
- ⌃⌥ + ← Move cursor to next monitor
- ⌃⌥ + → Move cursor to previous monitor
Move Windows
- ⇧⌥ + ← Move active window to previous monitor
- ⇧⌥ + → Move active window to next monitor
- ⇧⌥ + 1 Move active window to monitor 1 and maximize the window
- ⇧⌥ + 2 Move active window to monitor 2 and maximize the window
Other
-
⌃⌥⌘ + F Full Screen
-
⌃⌥⌘ + M Maximize Window
-
⌃⌥⌘ + C Window Center
-
⇧⌥ + H Switch active window
-
⇧⌥ + / Display a keyboard hint for switching focus to each window
System Tools
- ⌃⌥⌘ + L Lock Screen
Launch Application
- ⌃⇧ + I
IntelliJ IDEA
- ⌃⇧ + T
Terminal
- ⌃⇧ + Z
Calculator
- ⌃⇧ + D
Finder
- ⌃⇧ + Q
Activity Monitor
- ⌃⇧ + S
System Preferences
- ⌃⇧ + C
Google Chrome
- ⌃⇧ + A
Launchpad
Snippet & Memorandum
- ⌥⌘ + X Add a snippet or memos
- ⌥⌘ + V List snippet or memos and use them
JSON format
- ⌥⌘ + G JSON format
automatic synchronization time
- ⌥⌘ + T automatic synchronization time
Translation
- ⌥⌘ + F Translation
Support baidu and youdao translation API. Baidu Translation can be used directly. Youdao translation requires first applying youdao translation API and configuring appKey and appSecret
Screen color selection function
Click the screen color in the menu bar, click the color picker after the screen color picker interface appears, and the color value at the position of the mouse on the screen can be obtained
caffeine
On the menu bar, click caffeine to turn on the system's never sleep feature, and then click again to turn it off
The status bar shows the status of the input method
Can display case status, input method status, Chinese and English status. So far, only sogou input method has been tested