sugarrush 2026.8.3

A terminal UI for viewing Nightscout CGM (blood glucose sensor) data
# sugarrush config
# Copy to ~/.config/sugarrush/config.toml and set perms 600:
#   mkdir -p ~/.config/sugarrush
#   cp config.example.toml ~/.config/sugarrush/config.toml
#   chmod 600 ~/.config/sugarrush/config.toml

# Base URL of your Nightscout instance (no trailing slash).
url = "https://nightscout.example.com"

# Read-only access token.
# Create it in Nightscout Admin Tools: add a Subject with the `readable` role,
# then copy its access token here. Do NOT use API_SECRET (admin-level).
token = "readonly-subject-token"

# Display units: "mgdl" or "mmol". Toggle live in-app with `u`.
units = "mmol"

# Graph marker style: "dots" (default), "blocks", or "line".
graph_style = "dots"

# How many days of history the AGP view (the "AGP" graph tab) folds into its
# percentile profile, and the window the stats panel's TIR / mean / GMI are
# computed over (14 is the clinical standard). Clamped to 1–90. Change live in
# settings; cycle graph tabs with Tab.
agp_days = 14

# How long a sensor is expected to last, so its age can be read as time
# remaining — a Dexcom G6/G7 runs 10 days, a Libre 14. Clamped to 0-30, where
# 0 keeps showing the sensor's age but never calls it expiring, which is what
# you want if your uploader logs no sensor changes at all. Change live in
# settings.
sensor_days = 10

# Auto-refresh interval in seconds.
refresh_secs = 30

# Minimap navigator: a trailing overview strip under the graph. Click or drag
# it to move the main window. Enabling it turns on terminal mouse capture
# (hold Shift to select text while the app runs).
[minimap]
enabled = true
span_hours = 24

# Which parts of a reading a status bar is given, for `sugarrush status`,
# `sugarrush waybar`, and the Quickshell pill. Everything is on by default;
# switch off whatever crowds your bar. The reading itself is always shown, as
# is the out-of-range marker.
#
# `units` and `sparkline` reach the JSON output only: the plain, polybar, tmux
# and i3blocks lines have never carried a unit and no text format draws a
# trace, so switching them on cannot add anything there.
[bar]
arrow = true      # the trend arrow after the reading
delta = true      # the change since the previous reading
units = true      # the unit label, for a bar that renders one
sparkline = true  # the last hour, for a bar that draws it

# Optional local outage/startup history. Off by default because enabling it
# creates a durable health-data record on this computer. Files are owner-only;
# turning this off in settings deletes them.
[history_cache]
enabled = false
retention_days = 14


# Alert thresholds and behaviour. Glucose bounds are in the same unit as
# `units` above (mmol/L here). This whole section is optional, as is each key;
# the values shown are the mmol equivalents of the defaults.
#
# If you change `units` to "mgdl", change these numbers too — 3.9 mmol/L is
# 70 mg/dL, not 3.9. sugarrush now refuses thresholds outside the physiological
# range and tells you which one it corrected, rather than running with an alarm
# that can never fire.
[alerts]
urgent_low = 3.0      # red banner + critical notification at or below
low = 3.9             # yellow banner below
high = 10.0           # yellow banner above
urgent_high = 13.9    # red banner + critical notification at or above
stale_minutes = 15    # warn when the newest reading is older than this
desktop = true        # fire desktop notifications (Linux/macOS/Windows)
sound = true          # looping audible alarm on urgent low/high and stale data
osd = true            # also show urgent alerts on Omarchy's on-screen display,
                      # which Do Not Disturb cannot suppress (ignored elsewhere)
snooze_minutes = 15   # how long the `a` key silences the audible alarm
# Quiet hours: during this window only urgent-low sounds (others stay silent).
# Omit to disable. The window may cross midnight.
# quiet_start = "23:00"
# quiet_end = "07:00"
# quiet_urgent_low = true   # keep urgent-low audible overnight (safety)
# Escalation: re-notify (and push) if an urgent alert isn't cleared in time.
# escalate_minutes = 20     # 0 disables
# push_url = "https://ntfy.sh/your-topic"  # POST urgent alerts here (ntfy/webhook)
# push_enabled = true       # toggle push alerts (in settings) without losing the URL
# Notification privacy: false keeps desktop notifications content-free (no
# reading, no alert name) for lock screens and shared displays. They still fire,
# and urgent ones are still critical.
# notify_content = true
# Predictive alert: warn when the forecast crosses low/high within N minutes.
predict_horizon_minutes = 30   # 0 disables

# Display colors (optional). Each is a color name (red, green, cyan, yellow,
# blue, magenta, gray, white, light*) or a #rrggbb hex value.
# [theme]
# low = "red"
# in_range = "green"
# high = "yellow"
# urgent = "red"
# prediction = "magenta"
# graph = "cyan"

# Multiple sites (optional). Provide one or more [[sites]] instead of the
# top-level url/token above, and switch between them in-app with `n`.
# [[sites]]
# id = "018f3f7a-b492-7c2e-a851-2d0f4af43a20" # generated; immutable identity
# name = "home"
# url = "https://home.example.com"
# token = "readonly-token-1"
# write_token = "careportal-token" # optional; permits confirmed treatment writes
# timezone = "Europe/Amsterdam" # IANA zone for this person's AGP and exports
# # Optional: use a complete alert profile for this person instead of the
# # top-level [alerts]. The in-app settings screen is the easiest way to create
# # it and writes every value, including disabled quiet hours and push alerts.
# [sites.alerts]
# low = 4.4
# high = 10.0
#
# [[sites]]
# name = "clinic"
# url = "https://clinic.example.com"
# token = "readonly-token-2"

# Permit `sugarrush treatment --non-interactive` to write without a human.
#
# Off by default, and deliberately not editable in the settings screen. The
# interactive write path is guarded by typing the person's name; the unattended
# path skips that by construction, so the grant has to exist at rest. Turning
# this on lets anything that can run a command on this machine write to that
# person's health record. `sugarrush about` reports whether it is on.
# allow_unattended_writes = false