https://github.com/simpleapps-public/ping-menubar
Minimal macOS menu bar app that displays ping results as a compact visualization.
https://github.com/simpleapps-public/ping-menubar
macos menubar-app minimalistic ping pyobjc python
Last synced: 6 months ago
JSON representation
Minimal macOS menu bar app that displays ping results as a compact visualization.
- Host: GitHub
- URL: https://github.com/simpleapps-public/ping-menubar
- Owner: simpleapps-public
- License: mit
- Created: 2024-12-07T12:14:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-21T22:14:50.000Z (10 months ago)
- Last Synced: 2025-03-25T04:23:53.690Z (6 months ago)
- Topics: macos, menubar-app, minimalistic, ping, pyobjc, python
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ping-menubar
A minimal macOS menubar app that displays ping times as a compact visualization.
![]()
### Configuration options
```
PING_HOST = "1.1.1.1"
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](https://github.com/simpleapps-public/ping-menubar/releases).
## Development Setup
### Run directly
```bash
# 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```bash
# 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
```bash
# 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
```