A comprehensive guide to installing, configuring, and using Aegis - a macOS menu bar replacement for Yabai window manager.
- Overview
- Requirements
- Installation
- Yabai Integration Setup
- Features
- Usage
- Configuration
- Troubleshooting
- FAQ
Aegis transforms your macOS menu bar and notch area into a powerful control center for managing workspaces and windows. It provides:
- Visual workspace indicators showing all spaces with window icons
- Notch HUD for volume, brightness, now-playing music, Bluetooth devices, Focus mode, and system notifications
- System status display (battery, WiFi, Focus mode, clock)
- Window management via drag-drop and context menus
Aegis communicates with Yabai in real-time via a FIFO pipe, ensuring instant updates when you switch spaces or move windows.
| Requirement | Details |
|---|---|
| macOS | 14.0+ (Sonoma or later) |
| Hardware | Apple Silicon Mac (M1/M2/M3) with notch recommended |
| Yabai | 7.0+ installed and running |
Aegis requires the following permissions:
- Accessibility - For menu bar display and window tracking
- Automation - For controlling Yabai and Music.app
- Notifications - For startup status notifications (optional)
If you haven't already installed Yabai:
brew install koekeishiya/formulae/yabaiFor full functionality (space management, window moving between spaces), you need to:
- Partially disable SIP (System Integrity Protection)
- Install the Yabai scripting addition
See the Yabai Wiki for detailed instructions.
Option A: Download Release
Download the latest .dmg from Releases and drag Aegis to Applications.
Option B: Build from Source
git clone https://github.com/yourusername/aegis.git
cd aegis
open Aegis.xcodeproj
# Press Cmd+B to build, Cmd+R to runOn first launch:
- Go to System Settings → Privacy & Security → Accessibility
- Enable Aegis in the list
- You may be prompted to grant Automation access - click Allow
Aegis communicates with Yabai via a FIFO pipe. This requires a one-time setup.
Run the setup script (created automatically on first launch):
~/.config/aegis/setup-aegis-yabai.shThe script will:
- Create
~/.config/aegis/directory - Install
~/.config/aegis/aegis-yabai-notifynotification script - Register Yabai signals for real-time events
- Optionally add integration to
~/.yabaircfor persistence
If you prefer manual setup, add this to your ~/.yabairc:
# AEGIS_INTEGRATION_START
AEGIS_NOTIFY="$HOME/.config/aegis/aegis-yabai-notify"
yabai -m signal --add event=space_changed action="YABAI_EVENT_TYPE=space_changed $AEGIS_NOTIFY" label=aegis_space_changed
yabai -m signal --add event=space_destroyed action="YABAI_EVENT_TYPE=space_destroyed $AEGIS_NOTIFY" label=aegis_space_destroyed
yabai -m signal --add event=window_focused action="YABAI_EVENT_TYPE=window_focused $AEGIS_NOTIFY" label=aegis_window_focused
yabai -m signal --add event=window_created action="YABAI_EVENT_TYPE=window_created $AEGIS_NOTIFY" label=aegis_window_created
yabai -m signal --add event=window_destroyed action="YABAI_EVENT_TYPE=window_destroyed $AEGIS_NOTIFY" label=aegis_window_destroyed
yabai -m signal --add event=window_moved action="YABAI_EVENT_TYPE=window_moved $AEGIS_NOTIFY" label=aegis_window_moved
yabai -m signal --add event=application_front_switched action="YABAI_EVENT_TYPE=application_front_switched $AEGIS_NOTIFY" label=aegis_application_front_switched
# AEGIS_INTEGRATION_ENDFor full functionality, the Yabai scripting addition should be loaded. Add to your ~/.yabairc:
# Load scripting addition (requires sudoers entry)
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"See Yabai Wiki - Installing the Scripting Addition for sudoers configuration.
After setup, check the status in Aegis:
- Right-click the layout button (left side of menu bar)
- Look at the Status section:
- Yabai: Should show version number
- SA: Should show "Loaded"
- Aegis: Shows Aegis version
- Link: Should show "Active"
If SA shows "Not loaded", click it to load with an admin prompt.
┌─────────────────────────────────────────────────────────────────────┐
│ [Layout] │ [1 🌐📧] │ [2 💻📝] │ [3 🎵] │ ⊙ │ 🔋 📶 10:30 │
└─────────────────────────────────────────────────────────────────────┘
↑ ↑ ↑ ↑
Actions Space indicators Notch area System status
Each space shows:
- Space number (1, 2, 3...)
- Window icons for apps on that space
- Active state highlighting for the current space
- Stack badges showing stacked window count
Left-click cycles through layout actions. Right-click opens the full context menu.
Scroll wheel actions:
- Scroll up/down to cycle through: Rotate 90°, Rotate 180°, Rotate 270°, Balance, Flip X, Flip Y, Toggle Layout
The notch area displays contextual information:
| Trigger | Display |
|---|---|
| Volume change | Volume icon + progress bar |
| Brightness change | Brightness icon + progress bar |
| Music playing | Album art + visualizer or track info |
| Bluetooth device connects | Device icon + name + battery ring |
| Bluetooth device disconnects | Device icon + name + "Disconnected" |
| Focus mode enabled | Focus icon + mode name + "On" |
| Focus mode disabled | Focus icon + mode name + "Off" |
| System notification | App icon + title + body text |
The HUD slides in from under the notch with smooth spring animation and auto-hides after a configurable delay.
The Media HUD shows album art on the left and either a visualizer or track info on the right. It works with all media sources (Music, Spotify, Safari, Firefox, Chrome, YouTube, video players, etc.):
- Visualizer mode (default): Animated bars that respond to playback
- Track Info mode: Song title and artist name
- Expands to show full text when track changes
- Collapses after 3 seconds
- Long text scrolls with marquee animation
- Tap album art to toggle between modes
Bluetooth Device HUD:
- Automatically detects when AirPods, headphones, speakers, keyboards, mice, or trackpads connect/disconnect
- Shows device type icon (e.g., AirPods Pro icon for AirPods)
- Displays battery level as a circular ring indicator (green/orange/red based on level)
- Separate notifications for connect and disconnect events
Focus Mode HUD:
- Triggers when Focus mode is enabled or disabled via Control Center or System Settings
- Shows the actual Focus mode icon from your configuration (e.g., moon for Do Not Disturb, briefcase for Work)
- Displays the mode name (e.g., "Study", "Work", "Personal")
- Shows "On" (purple) when enabled, "Off" (gray) when disabled
Notification HUD:
- Intercepts system notifications from any app (Messages, Slack, WhatsApp, etc.)
- Shows the app icon + notification title + body text in the notch area
- Dismisses the native macOS notification banner automatically
- Click anywhere on the HUD to open/focus the source app
- Uses Yabai to focus the app window (respects your window layout)
- Falls back to launching the app if no window exists
- Auto-hides after 8 seconds (configurable)
- Note: Native banner may briefly flash (~50-150ms) before being dismissed - this is a macOS limitation
Right side of the menu bar shows:
- Battery - Color-coded (green/yellow/orange/red) with charging indicator
- WiFi - Signal strength with 3-level indicator
- Clock - Current time
- Date - Configurable format (long or short)
Aegis automatically detects external monitors and creates menu bars for each display. Configure via Settings or multiMonitorMode in config:
| Mode | Description |
|---|---|
| Auto (default) | Single display = primary only, multiple = per monitor |
| Primary Only | Menu bar only on main display |
| Per Monitor | Each monitor shows only its own spaces |
| All Show All | All monitors show all spaces |
Display changes are detected instantly via CoreGraphics callbacks.
| Action | How |
|---|---|
| Focus a space | Click the space indicator |
| Focus a window | Click the window icon |
| See window title | Right-click a window icon |
| Move window to space | Drag window icon to another space |
| Delete a space | Swipe up on space indicator |
| Create new space | Context menu → Spaces → Create Space |
Right-click the layout button to access:
Layout
- Rotate (90°, 180°, 270°)
- Flip (horizontal/vertical)
- Balance windows
- Toggle BSP/float mode
- Stack/unstack windows
Windows
- Focus next/previous window
- Swap windows left/right
- Warp window (north/south/east/west)
- Toggle float/fullscreen
- Send to specific space
Stack Windows
- Stack current window onto another
- Submenu shows available target windows with icons
Spaces
- Focus left/right space
- Create/destroy space
System
- Restart Yabai
- Restart skhd
- Restart Aegis
- Open Settings
Status
- Yabai version and status
- SA status (clickable to load if not loaded)
- Aegis version
- Link status
Aegis doesn't define global hotkeys - use skhd for that. However, you can configure skhd to trigger Yabai commands that Aegis will reflect instantly.
Example skhd configuration:
# Focus spaces
alt - 1 : yabai -m space --focus 1
alt - 2 : yabai -m space --focus 2
alt - 3 : yabai -m space --focus 3
# Move windows
shift + alt - 1 : yabai -m window --space 1
shift + alt - 2 : yabai -m window --space 2
shift + alt - 3 : yabai -m window --space 3
# Layout
alt - r : yabai -m space --rotate 90
alt - b : yabai -m space --balance
alt - t : yabai -m window --toggle floatRight-click any space indicator → Settings
- Height, padding, spacing
- Corner radii
- Background opacity
- Indicator size
- Maximum icons displayed
- Icon size
- Stack badge position
- Auto-hide delay
- Progress bar dimensions
- Animation settings
- Battery level thresholds
- WiFi strength thresholds
- Date format (long/short)
- Spring response (snappiness)
- Spring damping (bounciness)
- Fade durations
multiMonitorMode- Auto, Primary Only, Per Monitor, All Show All
Settings are stored in UserDefaults and persist across launches. To reset to defaults, delete the Aegis preferences:
defaults delete com.aegis.AegisCheck Yabai is running:
yabai -m query --spacesCheck signals are registered:
yabai -m signal --list | grep aegisCheck FIFO pipe exists:
ls -la ~/.config/aegis/yabai.pipeCheck link status: Right-click → Status → Link should show "Active"
- Click the SA status in the context menu to load with admin prompt
- Or run manually:
sudo yabai --load-sa - For automatic loading, ensure your
~/.yabaircincludes the load command and you have a sudoers entry
- Verify Accessibility permission is granted
- Check if another app is suppressing the system HUD
- Look for errors in Console.app (filter by "Aegis")
- Check your media player is actually playing (Music, Spotify, browser video, etc.)
- Album art is cached per-track - if wrong, quit and reopen Aegis
- The MediaRemote framework sometimes has delays - wait a moment
- Ensure Bluetooth permission is granted to Aegis
- Device must be a Bluetooth device (not USB)
- Battery level may not show immediately for newly connected devices - system_profiler takes 1-2 seconds
- Check logs for "BluetoothDeviceService" entries:
tail -f ~/Library/Logs/Aegis/aegis.log | grep Bluetooth
- Ensure Aegis has permission to read the DoNotDisturb directory
- Focus mode changes must be made via Control Center or System Settings (not third-party apps)
- Check logs for "Focus" entries:
tail -f ~/Library/Logs/Aegis/aegis.log | grep Focus - Custom Focus modes should show their configured icon and name
- Ensure Accessibility permission is granted (required for AXObserver)
- Check that notifications are enabled for the source app in System Settings → Notifications
- Check logs for "NotificationService" entries:
log show --predicate 'process == "Aegis"' --last 1m | grep Notification - If the app icon doesn't load, the bundle identifier may not be recognized - check if the app is running
This is a known macOS limitation. The Accessibility API fires after macOS has already rendered the notification. The flash duration (~50-150ms) cannot be reduced further. Aegis dismisses the banner as quickly as possible by:
- Dismissing BEFORE extracting notification content
- Using the "Close" action directly (not AXPress which opens the app)
Run the setup script:
~/.config/aegis/setup-aegis-yabai.shThen restart Yabai:
yabai --restart-service- Check Activity Monitor for high CPU usage
- Progress bar animation should use ~1-2% CPU when active, zero when idle
- Reduce max displayed icons in Settings if needed
Aegis logs to ~/Library/Logs/Aegis/aegis.log. View with:
tail -f ~/Library/Logs/Aegis/aegis.logOr open in Console.app.
Partially. The Notch HUD (volume/brightness/music) works independently. However, the space indicators require Yabai.
Yes, but the notch HUD features are designed for MacBooks with a notch. On other Macs, the HUD appears at the top center of the screen.
Yes. Aegis automatically detects external monitors and creates a menu bar for each display. You can configure the behavior in Settings:
- Auto: Shows all spaces on single monitor, per-monitor spaces when multiple displays are connected
- Primary Only: Menu bar only on the main display
- Per Monitor: Each display shows only the spaces assigned to it
- All Show All: Every display shows all spaces
Currently, Aegis is designed specifically for Yabai. Support for other window managers is not planned.
Aegis displays its own window at the top of the screen. It doesn't technically replace the native menu bar - you can still access it by moving your mouse to the very top of the screen.
Use Yabai's menubar_opacity setting in your .yabairc:
yabai -m config menubar_opacity 0.0The scripting addition is injected into Dock.app and doesn't persist across system restarts. Your .yabairc should automatically reload it. If not working, check your sudoers configuration.
Currently, Aegis uses system accent colors and a dark theme. Custom themes are on the roadmap.
- Quit Aegis
- Delete
/Applications/Aegis.app - Remove the integration from
~/.yabairc(the section betweenAEGIS_INTEGRATION_STARTandAEGIS_INTEGRATION_END) - Delete
~/.config/aegis/ - Delete preferences:
defaults delete com.aegis.Aegis
- Issues: GitHub Issues
- Yabai Help: Yabai Wiki
See CHANGELOG.md for detailed release notes.
Aegis - A shield for your macOS menu bar.