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.
Spoons are intended to be pure-Lua plugins for users to use in their Hammerspoon configs.
As a community, we have created many great configurations for Hammerspoon, but sharing code between them is hard and fragile. Spoons have been created as a way to address these issues. Users should be able to download a Spoon and quickly integrate it into their config without worrying about what it is doing internally.
GitHub Menu Bar App
Menu bar app for macOS which shows 10 latest events for a github profile, similar to the event feed on github’s landing page:
Installation
install Hammerspoon - a powerful automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download github-activity.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet:
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
GitHub Contributions
A menubar app, which shows github contributions chart for the last 7 days, similar to the one on the github’s user page:
When clicked it shows some information about the user:
Customizations
When creating a spoon you can customize how it looks like by passing optional parameters descibed below.
Icons
You can change default square icon to any character, like
circle (‘●’):
star (‘★’):
Themes
You can also change colors of icons, by using one of the following color themes:
theme name
screenshot
classic
dracula
leftpad
pink
teal
Installation
install Hammerspoon - a powerful automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download github-contributions.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet:
-- github contributionshs.loadSpoon("github-contributions")spoon['github-contributions']:setup({usernames={'streetturtle','fork-my-spoons','mgubaidullin'},-- use on or multiple accounts-- theme = 'pink',-- char = '★'})spoon['github-contributions']:start()
GitHub Pull Requests
A menu bar app, showing a list of pull requests assigned to a user to review:
Each item in the list is showing following information:
To generate a token, go to: https://gitlab.com/-/profile/personal_access_tokens, select api scope and type a name.
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
layout: default
title: jira issues
nav_order: 2
—
Jira Menu Bar App
Shows a list of Jira tickets assigned to a user and grouped by a status. It’s also possible to transition selected ticket to a different status.
By default it shows a list of tickets returned by a following JQL:
assignee=currentuser() AND resolution=Unresolved
In order to show a different list (for example issues from the backlog or issues with a label) go to Jira’s advanced search, construct a query and use it in the app’s config.
Installation
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download jira-issues.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, with your parameters:
-- JIRAhs.loadSpoon('jira-issues')spoon['jira-issues']:setup({jira_host='https://jira.tmnt.ca',login='mikey',api_token='cowabunga123',jql='project = TMNT AND status = Open AND assignee in (EMPTY)'})spoon['jira-issues']:start()
Here is atlassian documentation on how to get an API token: Manage API tokens for your Atlassian account. In case you are using an old version of Jira, simply put your password instead of an API token.
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
layout: default
title: people in space
nav_order: 2
—
people in space
Shows number of people currently in space:
Installation
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the [latest release], and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download people-in-space.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, adding your parameters:
-- people in spacehs.loadSpoon('people-in-space')spoon['people-in-space']:start()
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
Spotify
A menubar app which shows currely playing song on Spotify, when clicked shows following menu, with details of the track:
Click on the first item of the menu toggles the playback.
Installation
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the [latest release], and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download spotify-mini-player.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, adding your parameters:
-- Spotify mini playerhs.loadSpoon("spotify-mini-player")spoon['spotify-mini-player']:start()spoon['spotify-mini-player']:bindHotkeys({next={{"alt"},"."},prev={{"alt"},","},playpause={{"alt"},"/"}})
The config above sets up the ollowing shortcuts:
⌥ + , - play next track
⌥ + . - play previous track
⌥ + / - play/pause
Spotify Now Playing
A menu bar app which shows currently playing song on Spotify:
Playing:
Paused:
Click on the bar toggles the playback. It is also possible to setup shortcuts to play next/previous track and toggle the playback - see below.
Installation
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download spotify-now-playing.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, adding your parameters:
-- Spotify current songhs.loadSpoon("spotify-now-playing")spoon['spotify-now-playing']:start()spoon['spotify-now-playing']:bindHotkeys({next={{"alt"},"."},prev={{"alt"},","},playpause={{"alt"},"/"}})
The config above sets up the ollowing shortcuts:
⌥ + , - play next track
⌥ + . - play previous track
⌥ + / - play/pause
Spotify Search and Play
A spotlight-like search for spotify, allows searching albums, artists, playlists and tracks and playing the selected item on Spotify client for macOS:
Installation
This app uses Spotify’s search API, so you need to create a developer account in order to use it, go to Developer Dashboard and register, then create a client id and a secret.
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download spotify-search-and-play.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, adding your parameters:
-- Spotify search and playhs.loadSpoon("spotify-search-and-play")spoon['spotify-search-and-play']:setup({client_id='<your client id>',secret='<your secret>'})spoon['spotify-search-and-play']:bindHotkeys({show={{"alt"},"S"}})
The above config will set up ⌥ + s to open the app.
layout: default
title: stocks
nav_order: 2
—
Stocks
A menu bar app showing stock prices for selected stocks based of yahoofinanceapi.com:
Installation
install Hammerspoon - a powerfull automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
get a “basic” api key from https://www.yahoofinanceapi.com/pricing
download stocks.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet, with your repositories:
-- Stockshs.loadSpoon('stocks')spoon['stocks']:setup({api_key='your api key',stocks='aapl,msft'#comma-separatedlistofstocksyouwanttofollow})spoon['stocks']:start()
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
layout: default
title: take a break
nav_order: 2
—
Take a break
A simple menu bar app which sends a notification (or a popup alert) to take a break after a given time:
Time left in minutes:
Alert:
Notification:
Installation
install Hammerspoon - a powerful automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download github-activity.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet:
-- take a breakhs.loadSpoon("take-a-break")spoon['take-a-break']:setup{notificationType='alert'}
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.
layout: default
title: weather
nav_order: 2
—
Weather
A menubar app which shows current weather for a given location:
When clicked, a menu with more detailed information is shown, it also includes the sunrise and sunset times.
Installation
This app is using OpenWeather as the data provider, so first you need to create an account and get an app id in order to use the API. Then
install Hammerspoon - a powerful automation tool for OS X
Manually:
Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.
Homebrew:
brew install hammerspoon --cask
download weather.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
open ~/.hammerspoon/init.lua and add the following snippet:
-- weatherhs.loadSpoon('weather')spoon.weather:setup{app_id='<your app id>',-- units = 'f',lat=45.501670,lon=-73.567221,-- city = 'Montreal,QC,CA'}spoon.weather:start()
By defaul the temperature is in celsius, to change it to fahrenheit add parameter units with value ‘f’. For the location you can either use latitude and longtitude, or city name.
This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.