Introduction
SketchyBar is an open-source status bar replacement for macOS written in C. It is designed for users who want full control over every element displayed in their menu bar. Each bar item is defined through shell scripts, making the bar entirely programmable and responsive to system events. It pairs well with tiling window managers like yabai.
What SketchyBar Does
- Renders a fully custom status bar that replaces or overlays the default macOS menu bar
- Supports scripted bar items that update dynamically based on shell commands or event triggers
- Provides built-in drawing primitives including graphs, sliders, and background shapes
- Handles mouse click events on bar items with configurable callback scripts
- Supports multiple displays with independent bar configurations per monitor
Architecture Overview
SketchyBar is written in C and communicates with macOS through the CoreGraphics and SkyLight private frameworks to draw directly on the screen. It runs as a lightweight daemon process that reads a shell configuration file on startup. Bar items are defined via command-line messages sent to the running process. Each item can have associated scripts triggered by events such as system wake, space changes, or periodic timers. The bar renders using CoreGraphics, achieving smooth animations at low CPU cost.
Self-Hosting & Configuration
- Install via Homebrew from the FelixKratz tap
- Configuration lives in
~/.config/sketchybar/sketchybarrc, a bash script executed at launch - Bar items are added and configured using the
sketchybarCLI with--add,--set, and--subscribecommands - Custom plugins are shell scripts placed in a plugins directory and referenced by item definitions
- Requires macOS 12 (Monterey) or later; works with both Intel and Apple Silicon
Key Features
- Extremely low resource usage due to native C implementation
- Smooth animations for item transitions, graph updates, and bar toggling
- Event subscription system allowing items to react to system and custom events
- Support for SF Symbols, custom icon fonts, and images in bar items
- Fully transparent to the window manager, compatible with yabai and Amethyst
Comparison with Similar Tools
- macOS default menu bar — not customizable beyond showing or hiding built-in icons
- BitBar / xbar — displays script output in the menu bar but cannot replace the bar itself or animate items
- Polybar — highly customizable status bar for Linux (X11) but not available on macOS
- Waybar — status bar for Wayland compositors on Linux, similar concept but different platform
- Simple Bar (Uebersicht widget) — a Uebersicht widget providing a custom bar, but depends on the Uebersicht runtime and uses more resources
FAQ
Q: Can SketchyBar run alongside the default macOS menu bar? A: Yes. You can run SketchyBar as an overlay without hiding the system menu bar, or hide the system bar entirely via System Settings for a clean look.
Q: How do I add a battery indicator or CPU graph?
A: Write a shell script that outputs the desired value (e.g., pmset -g batt), then register it as a bar item with a periodic update interval in your sketchybarrc.
Q: Does SketchyBar work with yabai? A: Yes. SketchyBar is commonly used alongside yabai. It can subscribe to yabai events like space changes and window focus to display workspace information.
Q: Is there a GUI for configuring SketchyBar? A: No. All configuration is done through the shell-based rc file and CLI commands. Community-shared dotfiles provide good starting points.