hammerspoon README

The project's README from github.com/Hammerspoon/hammerspoon. As one markdown file: README.md.

Hammerspoon

CI codecov.io Downloads current release Downloads all releases Latest tag Latest release

Discord: Click to join

What is Hammerspoon?

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.

How do I install it?

Manually

Homebrew

What next?

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:

What is the history of the project?

Hammerspoon is a fork of Mjolnir. 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.

What is the future of the project?

Our intentions for Hammerspoon broadly fall into these categories:

hammerspoon (Hammerspoon/hammerspoon)

Searching Database…

这是什么?Hammerspoon 是 macOS 与 Lua 脚本引擎之间的桥梁,通过扩展把系统功能暴露给 Lua 脚本,让你可以自动化和控制自己的 Mac。
这是我运行的应用,还是要导入项目的库?它是一个独立的 macOS 应用(Hammerspoon.app),在后台运行并执行你的 Lua 配置文件,而不是嵌入到其他项目中使用的东西。
怎么安装并开始使用?可以通过 Homebrew 安装(brew install hammerspoon --cask),也可以下载发行版并把 Hammerspoon.app 拖到“应用程序”文件夹。然后创建 ~/.hammerspoon/init.lua,并在其中填入你自己的自动化代码。
用它之前需要先懂 Lua 吗?需要。你要用 Lua 编写自动化脚本,因为 Hammerspoon 的扩展完全通过 Lua 脚本来控制。
装好之后开箱即用吗?不能。Hammerspoon 不附带任何功能,在你使用其 API 并编写自己的 init.lua 配置(或参考社区提供的示例配置)之前,它没有任何默认行为。
所有 Mac 都能用吗,还是只支持较新的机型?它专门为 macOS(最初称为 OS X)开发;文中没有提到对特定 Mac 芯片或系统版本的限制。
为什么要有 Hammerspoon,而不直接用 Mjolnir?Hammerspoon 是从 Mjolnir 分支出来的,因为开发团队希望获得更整合的使用体验;而 Mjolnir 则力求保持精简,其扩展通过外部托管并由 Lua 包管理器管理。
可以用它自动化哪些事情?由于它把系统 API 以 Lua 扩展的形式暴露出来,你可以编写脚本实现窗口管理、快捷键以及其他操作系统层面的行为。项目声明的目标是覆盖更广泛的系统 API,并让各扩展之间的集成更加紧密。
Size
158.6 MB
Stars
16.3K
Age
12y
Commits · 90 Days