Skip to content

NoamFav/sketchybar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 SketchyBar Configuration

A Tokyo Night-inspired SketchyBar setup for macOS with Aerospace integration

macOS SketchyBar License: GPL v3


πŸ” Overview

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.

✨ Key Features

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
✈️ Aerospace Config Included Pre-configured .aerospace.toml for seamless integration

πŸ“‹ Table of Contents

πŸ€– What the Installer Does

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 framework
  • switchaudio-osx - Audio device switching functionality
  • nowplaying-cli - Media player integration
  • pnpm - Package manager for building app font
  • sketchybar - 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-font with 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

πŸ”§ Installation

Prerequisites

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

Quick Installation

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.sh

The installer handles everything automatically. After completion, your status bar will restart with the new configuration.

βš™οΈ Required Customization

⚠️ 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:

  1. Find your interface:

    networksetup -listallhardwareports
  2. Look for "Wi-Fi" and note the "Device" name (usually en0, en1, etc.)

  3. Update items/wifi.lua with your interface name (currently set to en8)

🌀️ 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-cli for 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:

  1. Copy the included .aerospace.toml to ~/.aerospace.toml
  2. Restart Aerospace: aerospace reload-config
  3. 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.

πŸ“ Configuration Structure

~/.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

πŸ” Verification & Troubleshooting

App Font Test

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 -f

Common Issues

Troubleshooting 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 Tips

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
})

πŸ™ Credits & Acknowledgments

🌟 Primary Credits

🎯 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

πŸš€ Roadmap

🚧 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

πŸ“œ License

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.

πŸ’‘ Contributing

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors