SwiftBar
Put anything in your macOS menu bar
Run any script from your menu bar
As long as the SwiftBar app is running, every script you add to your plugins folder will appear in your macOS menu bar.
Use any language - Bash, Python, Ruby, Swift, JavaScript. If it can output text, SwiftBar can display it.
The scripts run on a schedule you define, and the output appears right in your menu bar - with support for icons, colors, and dropdown menus.
#!/bin/bash
# Refresh every 5 seconds
cpu=$(top -l 1 | grep "CPU usage" | awk '{print $3}')
echo "💻 $cpu"
echo "---"
echo "Activity Monitor | bash='open -a \"Activity Monitor\"'"
echo "Refresh | refresh=true"
Rich formatting and interactivity
SwiftBar supports a wide range of formatting options to make your menu bar items both beautiful and functional.
- Colors & Icons - Use emojis, SF Symbols, or custom images
- Dropdown Menus - Create hierarchical menus with submenus
- Click Actions - Run commands when items are clicked
- Parameters - Pass data between menu items and scripts
Every menu item can have its own style, making it easy to highlight important information at a glance.
SwiftBar Menu Demo
Screenshot showing dropdown menu with formatted items
Plugin ecosystem
Browse hundreds of community-created plugins or build your own. The plugin repository includes scripts for:
Installing a plugin is as simple as downloading a script and adding it to your plugins folder. SwiftBar handles the rest.
#!/bin/bash
# github-pr.30s.sh
prs=$(gh pr list --json number,title | jq length)
echo "🔄 PRs: $prs"
echo "---"
gh pr list --json number,title,author | jq -r '.[] | "PR #\(.number): \(.title)"'
#!/usr/bin/env python3
# weather.1h.py
import requests
weather = requests.get('http://wttr.in/?format=%t+%c').text
print(f"Weather: {weather}")
print("---")
print("Open Weather.com | href=https://weather.com")
#!/usr/bin/swift
// battery.10s.swift
import IOKit.ps
let info = IOPSCopyPowerSourcesInfo().takeRetainedValue()
let sources = IOPSCopyPowerSourcesList(info).takeRetainedValue() as Array
print("🔋 \(batteryLevel)%")