Skip to content

obecker/brew-auto-update-spoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release

BrewAutoUpdate.spoon

Hammerspoon plugin (a.k.a. Spoon) for running brew update automatically.

The plugin executes brew update at Hammerspoon's startup and then repeatedly every 8 hours (or some other defined interval). If there are outdated packages (determined by executing brew outdated) it will display a notification with a button to run brew upgrade in a Terminal.

Example notification

In case there are too many outdated packages that cannot be fully displayed within the limited space of the notification's contents area, then clicking this contents area will toggle an alert with the full information.

Installation

Prerequisite: you have Hammerspoon installed.

Download the latest BrewAutoUpdate.spoon.zip file from the Releases page and double-click the extracted BrewAutoUpdate.spoon folder. Hammerspoon should automatically move it into your $HOME/.hammerspoon/Spoons/ folder.

Add this line to your $HOME/.hammerspoon/init.lua file:

hs.loadSpoon("BrewAutoUpdate"):start()

The plugin will auto-detect your brew binary and uses by default an update interval of 8 hours and a duration of 5 seconds for displaying the additional information alert. You may overwrite these settings with

hs.loadSpoon("BrewAutoUpdate"):config({
    brewBinary = "/path/to/your/brew",
    updateInterval = "6h", -- check for updates every 6 hours
    alertSeconds = 3 -- close the info alert after 3 seconds
}):start()

About

Hammerspoon plugin for running "brew update" automatically

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages