[Update]: ZeroOffset is now part of the official Hammerspoon Spoon repository! View it on the Spoons page here.
A Hammerspoon to display a UTC timestamp in the menubar. Toggle on and off with a click or hotkeys.
ZeroOffset.mp4
Hammerspoon must be installed and running.
We recommend using SpoonInstall to manage Spoons.
If using SpoonInstall then add the ZeroOffset repo and config to your ~/.hammerspoon/init.lua file.
-- ~/.hammerspoon/init.lua
-- ...
hs.loadSpoon("SpoonInstall") -- should already be set if using SpoonInstall
-- ...
shortcut_keys = { "ctrl", "alt" }
spoon.SpoonInstall.repos.ZeroOffset = {
url = "https://github.com/gavinest/ZeroOffset",
desc = "ZeroOffset spoon repository",
branch = "main",
}
spoon.SpoonInstall:andUse(
"ZeroOffset",
{
repo = "ZeroOffset",
start = true,
hotkeys = {
toggle = {shortcut_keys, "z"}
},
}
)
If not using SpoonInstall.
-
download and unzip
ZeroOffset.spoon.zip. -
Open the
ZeroOffset.spoondirectory and Hammerspoon should prompt that the newly installed spoon is now available. -
Add the following to your
~/.hammerspoon/init.luafile.
-- ~/.hammerspoon/init.lua
hs.loadSpoon("ZeroOffset")
spoon.ZeroOffset:bindHotkeys({toggle = {{"ctrl", "alt"}, "z"}}) -- or any other hotkey you prefer
spoon.ZeroOffset:start()- Make sure you have access to
hs.ipcin your shell or themakefilewon't work on certain commands.
-- ~/.hammerspoon/init.lua
require("hs.ipc")-
Create a feature branch and make your changes and commit.
-
If your changes do not require a release, open a pull request with your changes.
-
If your changes require a release, bump the version in the
VERSIONfile. Runmake version.
Commit files changed by the make version command to your feature branch. Open a pull requeest.
Once the pull request is merged, make sure you are on the main branch and run make tag to tag the commit with your version.
Push the tag to trigger the release workflow. git push origin "v$(<VERSION)".