Weather, music and system
Besides the clock, Atsurae can feed widgets four kinds of live data. Each source runs only while a widget that’s turned on uses it.
Weather
Section titled “Weather”| Token | Example |
|---|---|
{weather.temperature} |
21° |
{weather.feelsLike} |
20° |
{weather.high} |
24° (today’s high) |
{weather.low} |
15° (today’s low) |
{weather.condition} |
Partly Cloudy |
{weather.humidity} |
62% |
{weather.location} |
Cupertino |
Weather comes from Apple Weather and refreshes every 30 minutes. Temperatures use the unit set in System Settings ▸ General ▸ Language & Region.
Location
Section titled “Location”Atsurae needs to know where you are:
- Your Mac’s location. The first time a widget shows weather, macOS asks whether Atsurae may use your location. Atsurae only uses it to look up the weather, at city-level accuracy.
- A city you type. In Atsurae Settings ▸ Weather, type a city. Atsurae then never asks for your location.
If neither is available, weather tokens are empty, and Customize Widgets explains why when a weather widget is selected.
Attribution
Section titled “Attribution”Weather data is provided by Apple Weather. Atsurae shows Apple’s attribution in Customize Widgets and Settings, as required. You don’t need to add anything to your widget.
In scripts
Section titled “In scripts”context.weather has the numbers, so you can build your own formatting:
function update(context) { const w = context.weather; if (!w) return { line: "" }; return { line: `${Math.round(w.temperature)}${w.unit} and ${w.condition.toLowerCase()}` };}→ 21°C and partly cloudy
Now playing
Section titled “Now playing”| Token | Example |
|---|---|
{track} |
the song’s title |
{artist} |
the artist |
{lastTrack} / {lastArtist} |
the most recent song, which stays while it’s paused |
These show the song playing in Music or Spotify, and are empty when nothing is playing or playback is paused. They update the moment you change song or pause; there’s no polling and no permission prompt.
Combine them with hideWhenEmpty or visibleWhen: "{track}" so the widget disappears when the music stops. See the Now Playing Bar.
In scripts: context.track.title, context.track.artist and context.track.playing.
Battery
Section titled “Battery”| Token | Example |
|---|---|
{battery} |
82% |
{battery.level} |
0.82, for progress bars |
{batteryState} |
Charging, or On Battery |
On a Mac without a battery (iMac, Mac mini, Mac Studio, Mac Pro) these are empty. In scripts, check context.battery.present.
The built-in Battery & System widget shows the battery on laptops and CPU and memory on desktops automatically.
CPU and memory
Section titled “CPU and memory”| Token | Example |
|---|---|
{cpu} |
12%, all cores combined |
{cpu.level} |
0.12 |
{memory} |
8.1 GB used |
{memory.level} |
0.51, used ÷ installed |
{memory.total} |
16 GB installed |
CPU and memory are sampled every 5 seconds. “Memory used” matches Activity Monitor’s Memory Used: app memory, wired memory and compressed memory.
In scripts: context.cpu.level, context.memory.used, context.memory.total and context.memory.level.
Privacy
Section titled “Privacy”None of this data leaves your Mac. Widgets can’t send anything anywhere: scripts have no network access (see the sandbox). Weather requests go from Atsurae to Apple Weather with your approximate location, or the city you typed.
