This is a tool for powerful automation of OS X. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine.
What gives Hammerspoon its power is a set of extensions that expose specific pieces of system functionality, to the user. With these, you can write Lua scripts to control many aspects of your OS X environment.
Hammerspoon.app
from your Downloads
folder to Applications
brew install hammerspoon --cask
Out of the box, Hammerspoon does nothing - you will need to create ~/.hammerspoon/init.lua
and fill it with useful code. There are several resources which can help you:
Hammerspoon is a fork of Mjolnir by Steven Degutis. Mjolnir aims to be a very minimal application, with its extensions hosted externally and managed using a Lua package manager. We wanted to provide a more integrated experience.
Our intentions for Hammerspoon broadly fall into these categories:
环境说明 系统版本:macOS 10.15.7 Hammerspoon版本:0.9.81 Lua版本:5.4.0 需求整理 需求由来 用了一段时间的macOS后发现。有很多终端的指令需要记。常用的指令一般都不会忘。但是,一些不常用的指令,例如scp指令。所以就想要一个功能帮我记录这些常用指令的。后来引申到了想要记录一些常用的注释代码片段。 当然,我是知道这些备忘完全可以随便记录在macOS提供的备
1,安装HammerSpoon Hammerspoon-0.9.73.zip 解压,把Hammerspoon移动到应用程序 2,配置HammerSpoon $ cd ~/.hammerspoon/ $ vim init.lua 目录结构 ├── init.lua └── modules ├── hotkey.lua └── windows.lua init.lua配置 req