SwiftBar: Custom Menu Bar Widgets for macOS

⬅️ Back to Tools

SwiftBar: Your Menu Bar, Your Rules

Your Mac’s menu bar is prime real estate, but most apps don’t let you customize what lives there. SwiftBar https://swiftbar.app/ changes the game by letting you turn any shell script into a full-featured menu bar widget. Whether you want to monitor system stats, track cryptocurrency prices, or display your todo list, if you can script it, SwiftBar can show it.

It seamlessly runs existing BitBar plugins and includes a built-in plugin repository, so you can get started with zero coding or build something completely custom.

Key Features

📝 Script-Powered Widgets

SwiftBar turns executable scripts into living menu bar items. Write in any language you prefer:

  • Shell scripts (Bash, Zsh)
  • Python, Ruby, Node.js
  • Swift, Go, or anything executable

The script’s output becomes your menu bar display, text, emojis, or even SF Symbols.

🎨 Rich Plugin Ecosystem

Don’t want to build from scratch? SwiftBar has you covered:

  • BitBar Compatible: Uses the same plugin format as the classic BitBar
  • Plugin Repository: Built-in browser to discover and install plugins instantly
  • Community Plugins: Access hundreds of pre-made plugins for weather, GitHub, Spotify, system stats, and more

⚡ Flexible Refresh Schedules

Control exactly when your widgets update:

  • Time-based: Name your file with intervals like weather.10m.sh (10 minutes) or stocks.1h.py (1 hour)
  • Duration modifiers: ms, s, m, h, d for milliseconds to days
  • Cron syntax: Use <swiftbar.schedule>*/5 * * * *</swiftbar.schedule> metadata for complex schedules

🖥️ Multiple Plugin Types

SwiftBar supports different execution models for different use cases:

  • Standard: Run on a schedule, output and exit (most common)
  • Streamable: Keep running indefinitely, update on demand (great for live data like WebSockets)
  • Ephemeral: Create temporary menu items on demand via Shortcuts or URL schemes
  • Shortcuts: Use Apple’s Shortcuts app to create menu bar items without code

🔧 Rich Output Format

Go beyond simple text with powerful formatting options:

  • Colors & Fonts: CSS colors, custom fonts, and text sizes
  • SF Symbols: Native macOS icons with color customization
  • Images: Base64-encoded images or template images
  • Interactive Menus: Dropdown items with actions, checkmarks, tooltips, and badges
  • Actions: Open URLs, run scripts, refresh plugins, or trigger notifications on click

Platforms

  • 🍎 macOS 10.15 (Catalina) and up

Get Started

Option 1: Homebrew (Recommended)

brew install swiftbar

Option 2: Download from GitHub

Grab the latest release from the GitHub Releases page.

Option 3: Build from Source

git clone https://github.com/swiftbar/SwiftBar.git
cd SwiftBar
open SwiftBar/SwiftBar.xcodeproj
# Press play in Xcode

Creating Your First Plugin

Plugins live in a dedicated folder (set on first launch). Name your files using the convention:

{name}.{time}.{ext}

Example: hello.1m.sh refreshes every minute

Here’s a simple “Hello World” plugin:

#!/bin/bash
# <xbar.title>Hello World</xbar.title>
# <xbar.version>v1.0</xbar.version>
# <xbar.author>You</xbar.author>

echo "👋 Hello, World!"
echo "---"
echo "Current time: $(date '+%H:%M:%S')"
echo "Refresh | refresh=true"

Save it to your Plugin Folder, and SwiftBar will automatically detect and display it.

🔗 Website: swiftbar.app

🔗 GitHub: github.com/swiftbar/SwiftBar

Why This Tool Rocks

  • Infinite Possibilities: If you can write a script, you can put it in your menu bar. CPU monitors, crypto trackers, todo lists, GitHub notifications, the sky’s the limit.
  • Huge Plugin Library: Thousands of BitBar plugins work out of the box, plus SwiftBar’s own growing collection.
  • Native Performance: Written in Swift, feels like a real macOS app, not some Electron bloatware.
  • Free & Open Source: No subscriptions, no premium tiers, no data collection. The code is yours to audit and contribute to.
  • Actively Maintained: Regular updates with new features, Big Sur+ SF Symbol support, and modern macOS compatibility.

Crepi il lupo! 🐺