data | ||
icon | ||
jxa | ||
modules | ||
timesync | ||
.gitignore | ||
init.lua | ||
LICENSE.txt | ||
README_en.md | ||
README.md |
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
SOFTWARE ENVIRONMENT
systems:MacOS 10.14 +
Script Function description
The following functions have been performed
- The status bar displays the status of the input method
- Time synchronization
- Screen color selection function
- JSON formatting tools
- Translation function (baidu and Youdao API support)
- Caffeine (Set system to never sleep)
- memo
- Status bar displays system information (CPU/ memory/hard disk/Network speed)
- Window management
- Shortcut keys to quickly launch other applications
Features
JSON Formatting
- ⌥⌘ + G JSON Formatting
Interface and function description
- interface
- Introduction
- THE JSON formatting
- JSON code highlights
- Can search
- JSON to XML
- JSON to CSV
- JSON to YAML
Snippet & Memorandum
- ⌥⌘ + X Add a snippet or memos
- ⌥⌘ + V List snippet or memos and use them
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
- ⌥⌘ + P 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
- ⌥⌘ + S 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
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
- ⌃⇧ + A
Launchpad
- ⌃⇧ + C
calendar
- ⌃⇧ + D
Disk Utility
- ⌃⇧ + E
Finder
- ⌃⇧ + G
Google Chrome
- ⌃⇧ + Q
Activity Monitor
- ⌃⇧ + T
Terminal
- ⌃⇧ + S
System Preferences
- ⌃⇧ + Z
Calculator