Extensions for the macOS app SwiftBar
Find a file
2025-01-18 00:05:08 +00:00
SwiftBar Update changes 2025-01-17 15:41:43 -08:00
.gitignore Update .gitignore 2025-01-17 23:18:28 +00:00
example-servers.yaml Update changes 2025-01-17 15:41:43 -08:00
README.md Update README.md 2025-01-18 00:05:08 +00:00

🖥️ SwiftBar Plugin - vitals monitor

The vitals monitor plugin for SwiftBar provides status indicators for servers and integrates with the vitals script to monitor multiple servers and display key metrics in the macOS menu bar. It uses vitals for real-time diagnostics and displays VPN and DNS statuses.

Menu Bar Braille Indicators

The menu bar displays a Braille cluster, up to three rows tall, representing up to three servers. Each horizontal row corresponds to a server in the configuration. The dots in the cluster indicate specific statuses:

Cluster: VPN and DNS Status

  • Dot 1 (left): Whether the server is using a Mullvad exit node ( = yes, = no).
  • Dot 2 (right): Whether the server is using AdGuard Home ( = yes, = no).

Menu Bar Example

If you see in your menubar, that means:

  • Server 1: ○ ●
    • Left dot: (Mullvad is not in use)
    • Right dot: (AdGuard is in use).
  • Server 2: ● ●
    • Left dot: (Mullvad is in use)
    • Right dot: (AdGuard is in use).
  • Server 3: ○ ●
    • Left dot: (Mullvad is not in use)
    • Right dot: (AdGuard is in use).

Features

  • VPN & DNS Monitoring:
    • Displays Tailscale exit-node and DNS status (e.g., NextDNS, AdGuard Home).
  • Dynamic Menus:
    • Provides detailed server stats in the dropdown menu.
  • Remote Execution:
    • Allows executing VPN or DNS commands remotely using SSH.

Setup

  1. Ensure the vitals script is installed and executable on each monitored server.
  2. Update your configuration file at ~/.servers.yaml with the server details.
    • Example configuration:
POOL:
  - ts_id: "sij-mbp16"
    ts_ip: "100.64.64.20"
    ssh_port: 22
    ssh_user: sij
    ssh_pass: "NiceTry!"
    vitals: "/Users/sij/workshop/scripts/gitea/pathScripts/vitals"
    vpn: "/Users/sij/workshop/scripts/gitea/pathScripts/vpn"

  - ts_id: "sij-vm"
    ts_ip: "100.64.64.11"
    ssh_port: 22
    ssh_user: sij
    ssh_pass: "NiceTry!"
    vitals: "/home/sij/workshop/pathScripts/vitals"
    vpn: "/home/sij/workshop/pathScripts/vpn"

  - ts_id: "sij-fin"
    ts_ip: "100.64.64.5"
    ssh_port: 22554
    ssh_user: sij
    ssh_key: "/Users/sij/.ssh/id_ed25519"
    vitals: "/home/sij/workshop/scripts/pathScripts/vitals"
    vpn: "/home/sij/workshop/scripts/pathScripts/vpn"
  1. Place the vitals.30s.py plugin in your SwiftBar plugins folder and refresh SwiftBar.