A Tokyo Night-inspired SketchyBar setup for macOS with Aerospace integration
A personal SketchyBar configuration for macOS, designed to work seamlessly with Aerospace window manager. Built on Felix Kratz's excellent SbarLua framework, this configuration extends the original with Tokyo Night theming, custom widgets, and multi-monitor workspace integration.
| Feature | Description |
|---|---|
| π Tokyo Night Theme | Beautiful dark colorscheme matching Neovim setup |
| π₯οΈ Multi-Monitor Support | Native Aerospace workspace indicators across displays |
| π Rich Widgets | WiFi, battery, CPU, media player, and weather integration |
| π― Smart Workspaces | Auto-hiding empty workspaces with app icons |
| π¨ Custom Icons | Extended app icon font for beautiful visual indicators |
Pre-configured .aerospace.toml for seamless integration |
- What the Installer Does
- Installation
- Required Customization
- Configuration Structure
- Verification & Troubleshooting
- Customization Tips
- Credits
- Roadmap
The provided install.sh script automates the complete setup process through 5 stages:
Stage 1: Homebrew Dependencies
Installs all required packages:
lua- Core language for SbarLua frameworkswitchaudio-osx- Audio device switching functionalitynowplaying-cli- Media player integrationpnpm- Package manager for building app fontsketchybar- The main status bar application
Stage 2: Fonts Installation
Downloads and installs essential fonts:
- Apple SF Symbols, SF Mono, and SF Pro fonts
- Victor Mono Nerd Font for coding elements
- Custom
sketchybar-app-fontwith app icons (builds from source)
Stage 3: SbarLua Framework
Installs Felix's Lua framework that powers this configuration
Stage 4: Configuration Setup
- Backs up existing configuration
- Clones this repository to the correct location
- Sets up proper file permissions
Stage 5: Service Initialization
Restarts SketchyBar with the new configuration and validates installation
Required software
- macOS 12+: Required for SketchyBar compatibility
- Homebrew: Package manager for installing dependencies
- Aerospace: Window manager for workspace integration
- Git: For cloning the configuration repository
One-Command Setup
# Clone the repository
git clone https://github.com/NoamFav/sketchybar.git
cd sketchybar
# Make installer executable and run
chmod +x install.sh
./install.shThe installer handles everything automatically. After completion, your status bar will restart with the new configuration.
β οΈ Early Stage Notice:
This configuration is still under active development.
Some widgets and integrations are unfinished, experimental, or tailored to my setup.
Expect changes, and feel free to tweak for your own workflow. The git integrations is still under development and far from finished (and working for that matter)
π₯οΈ Multi-Monitor Setup (CRITICAL)
The Aerospace workspace configuration in ~/.config/sketchybar/items/aerospace_workspaces.lua is set up for my specific 3-monitor layout:
local WORKSPACE_LAYOUT = {
{ display = 3, workspaces = { "1", "2", "3", "4", "5", "6", "7", "8", "9" } }, -- left monitor
{ display = 1, workspaces = { "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P" } }, -- middle monitor
{ display = 2, workspaces = { "A", "S", "D", "F", "G", "Z", "X", "C", "V", "B" } }, -- right monitor
}You MUST modify this:
- Update display numbers to match your monitor arrangement
- Change workspace names to match your Aerospace configuration
- For single monitor setups, use
display = "active"and combine all workspaces
π WiFi Interface Configuration
The WiFi widget requires your specific network interface:
-
Find your interface:
networksetup -listallhardwareports
-
Look for "Wi-Fi" and note the "Device" name (usually
en0,en1, etc.) -
Update
items/wifi.luawith your interface name (currently set toen8)
π€οΈ Weather Location
Update the weather widget location in items/weather.lua on line 67 (an easier way will be added later)
π΅ Media Player Integration
The media widget (items/media.lua) uses osascript for Apple Music. For other players:
- Spotify: Replace osascript commands with Spotify equivalents
- Universal: Use
nowplaying-clifor broader player support (already installed)
βοΈ Aerospace Integration
This configuration includes a pre-configured .aerospace.toml that matches the SketchyBar workspace layout. Features include:
- Multi-monitor workspace assignment - Workspaces distributed across displays
- Seamless integration - SketchyBar automatically detects and displays workspace status
- Click interactions - Left-click to switch, right-click to move windows
- Auto-hiding workspaces - Empty workspaces hide automatically (except focused)
Setup Instructions:
- Copy the included
.aerospace.tomlto~/.aerospace.toml - Restart Aerospace:
aerospace reload-config - The SketchyBar will automatically sync with your workspace layout as long as it matches with your monitor layout.
If not using the included Aerospace config, you'll need to modify the WORKSPACE_LAYOUT in aerospace_workspaces.lua to match your setup.
~/.config/sketchybar/
βββ π sketchybarrc # Main configuration entry point
βββ π colors.lua # Tokyo Night color scheme
βββ π settings.lua # Global settings and styling
βββ π items/ # Individual widget configurations
β βββ π aerospace_workspaces.lua # Multi-monitor workspace indicators
β βββ π wifi.lua # WiFi status widget
β βββ π battery.lua # Battery indicator
β βββ π cpu.lua # CPU usage monitor
β βββ π media.lua # Now playing widget
β βββ π weather.lua # Weather information
β βββ π ... # Other widgets
βββ π helpers/ # Utility functions
β βββ π app_icons.lua # App name to icon mappings
β βββ π ... # Other helper functions
βββ π scripts/ # External shell scripts
Verify Icon Font Installation
# Test the app icons font
sketchybar --add item icon.test right
sketchybar --set icon.test label.font="sketchybar-app-font:Regular:18.0" label="figma"You should see the Figma icon. If not:
# Restart the font daemon
sudo killall -9 fontd
fc-cache -fTroubleshooting Guide
| Issue | Solution |
|---|---|
| Workspaces not showing | Check Aerospace config matches WORKSPACE_LAYOUT |
| WiFi widget broken | Update network interface in wifi.lua |
| Font issues | Run fc-cache -f and restart SketchyBar |
| Permission errors | Ensure SketchyBar has accessibility permissions |
| Colors incorrect | Verify Tokyo Night theme files are loaded |
| Customization | Location | Description |
|---|---|---|
| Colors | colors.lua |
Tokyo Night theme modifications |
| Fonts | settings.lua |
Font families and sizes |
| Widget Position | Individual item files | Left, center, or right positioning |
| Update Frequency | Widget files | Refresh intervals for dynamic content |
| New Widgets | items/ directory |
Create new files following existing patterns |
Advanced Customization Examples
-- Change update frequency for CPU widget
cpu:subscribe("cpu_update", function()
-- Custom logic here
end)
-- Modify color scheme
local colors = require("colors")
colors.primary = "#your_color_here"
-- Add custom widget
local custom_widget = sbar.add("item", "custom", {
position = "right",
-- Additional properties
})π― FelixKratz
The foundation of this entire configuration:
- SketchyBar - The revolutionary status bar application
- SbarLua - Elegant Lua framework for modern configs
- Original Dotfiles - Inspiration and structural foundation
- Ongoing Development - Continuous improvements to the ecosystem
Without Felix's groundbreaking work, none of this would exist.
π¨ Additional Contributors
- kvndrsslr - Beautiful app icons font
- Tokyo Night - Stunning color scheme inspiration
- Aerospace Team - Excellent tiling window manager
π§ Currently Working On
- Centralized Settings - Move hardcoded values to unified configuration
- Improved Error Handling - Better dependency validation and error messages
- Single-Monitor Documentation - Comprehensive guide for single-display setups
- Automatic Interface Detection - Smart WiFi interface discovery
- Multi-Player Media Support - Spotify, YouTube Music, and other services
π― Planned Features
- Configuration Wizard - Interactive setup for easy customization
- Display Auto-Detection - Automatic workspace layout generation
- Theme Variants - Multiple colorscheme options beyond Tokyo Night
- Window Manager Agnostic - Support for yabai and other managers
- Plugin System - Modular widget architecture for extensibility
π Known Issues
- Workspace indicators may flicker during rapid workspace switching
- Font installation can be inconsistent on some macOS versions
- Media widget limited to Apple Music (osascript dependency)
- Weather widget hardcoded to Maastricht location
- WiFi widget requires manual interface configuration
This project is licensed under the GNU GPL v3 - see LICENSE file for details.
This preserves the open-source nature of Felix's original work while allowing free use and modification.
Since this is a personal configuration, contributions are welcome for:
- π Bug Reports - Compatibility issues and fixes
- π‘ Feature Suggestions - Improvements for common use cases
- π§ Modifications - Share your customizations and forks
For major changes, please open an issue first to discuss your proposed modifications.
Built with β€οΈ on macOS using Felix's excellent SketchyBar and SbarLua
Inspired by Tokyo Night β’ Powered by Aerospace β’ Enhanced for productivity