Show minutes until sunset in your Mac menu bar

Photographers chase golden hour; everyone else wants to get outside before dark. This meter counts down the minutes to today’s sunset at your coordinates and turns yellow in the last hour.

Recipe tested October 29, 2026 with Multimeter 1.1. Source: Script.

Preview: the Laser Sword face and two alternatives, with sample values like the ones this recipe returns.

What you need

  • Multimeter for macOS 13 or later, $19.99 once.
  • The direct download version of Multimeter from this site (the Script source isn’t in the Mac App Store version).
  • jq for picking numbers out of JSON. It comes with macOS 15 and later; on macOS 13 or 14 run brew install jq.

Set it up

  1. Find your latitude and longitude. Open-Meteo’s place search gives them for any town (the first result’s latitude and longitude):
    Terminal
    curl -s 'https://geocoding-api.open-meteo.com/v1/search?name=Plano&count=1'
  2. Add a Script meter with your coordinates in this command:
    Command
    curl -s -m 8 'https://api.open-meteo.com/v1/forecast?latitude=33.02&longitude=-96.70&daily=sunset&timezone=auto&forecast_days=1&timeformat=unixtime' | jq '(.daily.sunset[0] - now) / 60 | floor'
  3. Refresh every 5 minutes. Range 0 to 720, unit min, alerts on Low values at 60 (golden hour) and 20.

Multimeter settings

In Customize This Meter… (from the meter’s menu):

Settings for this meter
SettingValue
SourceScript
Commandthe curl … | jq line above
Refresh every5 minutes
Range0 to 720
Unitmin
AlertsLow values: warning 60, critical 20
LabelSUN
FaceLevel Bar, Laser Sword or Label & Value

Tested: Run on October 29, 2026 at 11:45 in Plano, Texas: 412 minutes.

Script meters need the direct download version of Multimeter from this site, which is the one on sale now. How commands run, the PATH they see and the 10 second limit are in the Script meters guide.

Limits

  • After sunset the number goes negative until the next day’s data. Alerts stay red, which reads as “it’s dark”.

Variations

Minutes until sunrise

Use daily=sunrise&forecast_days=2 and .daily.sunrise[1] for tomorrow’s.

Troubleshooting

What the meter says, why, and what to do
SymptomCauseFix
The script didn’t print a numberThe command failed or printed an error message instead.Run the exact command in Terminal. If it works there, check for tools that live outside the meter’s PATH and use their full path (which tool).
The script took longer than 10 secondsA slow network call. Multimeter stops scripts after 10 seconds.Keep the -m timeout on curl, and refresh less often.
Scripts need the version from multimeterapp.comThis copy of Multimeter came from the Mac App Store, which can’t run scripts.Use the direct download version, or run the command from cron or launchd and point a File meter at its output.

Questions

Does this work in the Mac App Store version?

Script meters need the direct download version from multimeterapp.com, because the App Store sandbox doesn’t let apps run your commands. Web Address, File and Sent Value meters work in every version.

Related

Put it in your menu bar

$19.99 one-time. No subscription. Needs macOS 13 Ventura or later.