Skip to content

gavinest/ZeroOffset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ci

ZeroOffset

[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

Table of Contents

Installation

Hammerspoon must be installed and running.

With SpoonInstall

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"}
        },
    }
)

Manual Installation

If not using SpoonInstall.

  1. download and unzip ZeroOffset.spoon.zip.

  2. Open the ZeroOffset.spoon directory and Hammerspoon should prompt that the newly installed spoon is now available.

  3. Add the following to your ~/.hammerspoon/init.lua file.

-- ~/.hammerspoon/init.lua
hs.loadSpoon("ZeroOffset")
spoon.ZeroOffset:bindHotkeys({toggle = {{"ctrl", "alt"}, "z"}})  -- or any other hotkey you prefer
spoon.ZeroOffset:start()

Contributing

  1. Make sure you have access to hs.ipc in your shell or the makefile won't work on certain commands.
-- ~/.hammerspoon/init.lua

require("hs.ipc")
  1. Create a feature branch and make your changes and commit.

  2. If your changes do not require a release, open a pull request with your changes.

  3. If your changes require a release, bump the version in the VERSION file. Run make 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)".

About

A Hammerspoon to toggle UTC time in the menubar.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors