# Hammerspoon Configuration
## Usage
1. Install [Hammerspoon](http://www.hammerspoon.org/)
2. `git clone https://github.com/sugood/hammerspoon.git ~/.hammerspoon`
3. [Detailed description](https://blog.csdn.net/sugoods/article/details/108984326)
## Modifier keys
| | Key |
| --------- | -------------- |
| ⇧ | Shift |
| ⌃ | Control |
| ⌥ | Option |
| ⌘ | Command |
## Reference code
https://github.com/greyby/hammerspoon
## Language
- en [English](README_en.md)
- zh_CN [简体中文](README.md)
# SOFTWARE ENVIRONMENT
systems:MacOS 10.14 +
# Script Function description
The following functions have been performed
1. The status bar displays the status of the input method
2. Time synchronization
3. Screen color selection function
4. JSON formatting tools
5. Translation function (baidu and Youdao API support)
6. Caffeine (Set system to never sleep)
7. memo
8. Status bar displays system information (CPU/ memory/hard disk/Network speed)
9. Window management
10. Shortcut keys to quickly launch other applications
# Features
### JSON Formatting
* ⌥⌘ + G JSON Formatting
#### Interface and function description
1. interface

2. 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`