https://github.com/forecho/hammerspoon-config
🔨 Hammerspoon config
https://github.com/forecho/hammerspoon-config
hammerspoon
Last synced: over 1 year ago
JSON representation
🔨 Hammerspoon config
- Host: GitHub
- URL: https://github.com/forecho/hammerspoon-config
- Owner: forecho
- Created: 2019-09-29T03:02:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-14T13:56:49.000Z (over 2 years ago)
- Last Synced: 2024-10-11T21:55:31.713Z (almost 2 years ago)
- Topics: hammerspoon
- Language: Lua
- Homepage:
- Size: 9.77 KB
- Stars: 36
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hammerspoon 配置
## 使用方法
1. 安装 [Hammerspoon](http://www.hammerspoon.org/)
2.
```
git clone https://github.com/forecho/hammerspoon-config.git ~/.hammerspoon
cp config.lua.example config.lua
```
所以配置文件都在 `config.lua` 文件中,你可以按照自己的习惯或者需求修改此文件。
> 注:修改 `.lua` 文件会自动加载。
### 窗口管理
* ControlCommand + Return `最大化窗口`
* ControlCommand + → `把窗口移动到右边显示器`
* ControlCommand + ← `把窗口移动到左边显示器`
* ControlCommand + F `全屏或者退出全屏`
### 快速启动
* Option + G `Google Chrome`
* Option + C `Visual Studio Code`
* Option + I `iTerm`
* Option + P `PHPStorm`
* Option + W `WeChat`
* Option + Q `QQ`
* Option + M `Postman`
### 自动切换输入法
具体看 `config.lua` 文件里面的 `appInputMethod` 值。
PS:目前配置的中文输入法是微信输入法。使用命令 `defaults read ~/Library/Preferences/com.apple.HIToolbox.plist | grep "Input Mode"` 获取输入法的 SourceID,然后配置 `defaultInput.lua` 文件。
### 自动开关蓝牙
休眠自动关闭蓝牙,然后自动开启蓝牙。使用这个功能之前先要安装 `blueutil`
```sh
brew install blueutil
```
### 连接公司 Wi-Fi 自动静音
修改配置文件中的 `workWifi` 为公司 Wi-Fi 名称,如果你的 MacBook 默认语言不是中文,则需要修改 `outputDeviceName` 的值。