Skip to content

About

Display live blood sugar data from Nightscout in your system menu bar.

Topics

Resources

Stars

33 stars

Watchers

1 watching

Forks

Repository files navigation

Nightscout Menu Bar

Build

A small application that displays live blood sugar data from Nightscout on your menu bar.

Works on Windows, MacOS, and Linux.

Nightscout Menu Bar Screenshot

Install

Homebrew (macOS, Linux)

Click to expand

Install Nightscout Menu Bar from gabe565/homebrew-tap:

brew install gabe565/tap/nightscout-menu-bar

APT (Ubuntu, Debian)

Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo apt install ca-certificates
  2. Add gabe565 apt repository

    echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list
    
  3. Update apt repositories

    sudo apt update
  4. Install nightscout-menu-bar

    sudo apt install nightscout-menu-bar

RPM (Fedora, RHEL)

Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo dnf install ca-certificates
  2. Add gabe565 rpm repository to /etc/yum.repos.d/gabe565.repo

    [gabe565]
    name=gabe565
    baseurl=https://rpm.gabe565.com
    enabled=1
    gpgcheck=0
  3. Install nightscout-menu-bar

    sudo dnf install nightscout-menu-bar

AUR (Arch Linux)

Click to expand

Install nightscout-menu-bar-bin with your AUR helper of choice.

Binary

Automated builds are uploaded during the release process. See the latest release for download links.

Linux requirements

The packages above install these automatically. Linux builds need GTK 4.14+ and WebKitGTK 6.0, which are available on Ubuntu 24.04, Debian 13, Fedora 40, and newer:

  • Debian/Ubuntu: sudo apt install libgtk-4-1 libwebkitgtk-6.0-4
  • Fedora: sudo dnf install gtk4 webkitgtk6.0
  • Arch: sudo pacman -S gtk4 webkitgtk-6.0

GNOME needs the AppIndicator extension to show tray icons. If it's missing, the app offers to install it.

Usage

After launching Nightscout Menu Bar, open its tray menu and choose "Settings…" to configure the integration.

The settings window contains the following options:

  • Connection: Nightscout URL (required), API token, and Nocturne connected apps. Connecting to Nocturne shows a code and opens your browser to approve it; no token needs to be copied. When connected, this takes precedence over the API token.
  • Display: title, units (mg/dL or mmol/L), which parts of the reading appear in the menu bar, and the dynamic icon.
  • General: start on login, and exposing readings over a local socket (see contrib/powerlevel10k).
  • Advanced: fetch timing, age rounding, and log level.

Tokens are stored in the system keyring: Keychain on macOS, Credential Manager on Windows, or the Secret Service on Linux.

Contrib

Integrations with external tools are available in the contrib directory.

Development

The systray menu is provided by fyne.io/systray. See systray's platform notes for required dependencies.

The settings window is built with Wails, which uses the system webview. On Linux, building it requires GTK 4 and WebKitGTK 6.0 development packages (e.g. libgtk-4-dev libwebkitgtk-6.0-dev on Debian/Ubuntu).

The settings frontend is a Vue and TypeScript app in internal/settings/frontend. Building it requires Node.js and pnpm. This also regenerates the TypeScript bindings for the Go settings service:

go generate ./internal/settings/frontend

After changing the service, regenerate just the bindings with go generate -run wails3 ./internal/settings/frontend.

For hot reloading, run pnpm dev in that directory, then start the settings window with FRONTEND_DEVSERVER_URL=http://127.0.0.1:5173 go run . settings.

macOS

To generate a Mac app, run hack/build-darwin.sh. An app for each architecture will be created in the dist directory.

About

Display live blood sugar data from Nightscout in your system menu bar.

Topics

Resources

Stars

33 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages