Skip to content
 
 

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ping-menubar

A minimal macOS menubar app that displays ping times as a compact visualization, with selectable ping targets you can add and remove from the menu.

Features

  • Compact bar-graph visualization of recent ping times
  • Configurable ping targets via the menu:
    • Select the current host/IP to ping
    • Add new hosts/IPs
    • Remove hosts via an entry next to each saved IP
  • Always pings one host at a time, updating the menubar graph and tooltip

Ping configuration

These constants control how pings are sampled and visualized:

PING_INTERVAL = 2  # seconds
PING_TIMEOUT = 3  # seconds
PING_SAMPLES = 16  # number of results to show

# Ping time ranges and colors (RGB)
TIERS = [
    {"limit": 0, "color": NSColor.colorWithRed_green_blue_alpha_(0, 0, 0, 1.0)},
    {"limit": 70, "color": NSColor.colorWithRed_green_blue_alpha_(0.051, 0.843, 0.129, 1.0)},
    {"limit": 150, "color": NSColor.colorWithRed_green_blue_alpha_(0.820, 0.839, 0.153, 1.0)},
    {"limit": 400, "color": NSColor.colorWithRed_green_blue_alpha_(0.820, 0.059, 0.114, 1.0)},
]

BAR_WIDTH = 3
BAR_HEIGHT = 18

Quick Installation

Download the latest release from the GitHub Releases page of this repository.

Development Setup

Run directly

# Optional: Set up virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run directly
python ping-menubar.py

Build as an application

Required for launch-at-login functionality

# Install build dependencies
pip install -r requirements.txt
pip install setuptools==70.3.0
pip install py2app

# Build app
python3 setup.py py2app

# Copy to Applications
cp -r "dist/ping-menubar.app" /Applications/

Create dmg for distribution

# Install create-dmg
brew install create-dmg

# Build dmg
rm ping-menubar.dmg; create-dmg \
  --volname "Ping Menubar" \
  --window-size 400 160 \
  --icon-size 50 \
  --app-drop-link 270 100 \
  --icon "ping-menubar.app" 90 100 \
  "ping-menubar.dmg" dist

About

Minimal macOS menubar ping graph with selectable ping targets

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages