This is a config I made which aggregate functionnality and aesthetics, made in mind to be Nix-Compliant.
Warning
Some of the functionnalities of the bar are not working currently in MacOS Tahoe (26.0). This implies that: Space switching might not work properly, some menu items won't trigger and be removed from the macos native menubar when trying to trigger those and other not yet tested bugs might occur.
Screen.Recording.2025-08-09.at.17.55.32.mp4
With the installer :
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Kcraft059/sketchybar-config/main/install.sh)"Manual install:
Install sketchybar
brew tap FelixKratz/formulae
brew install sketchybar
brew services start sketchybarInstall this config with its dependencies
# brew install yabai # Recommended only if you already have a config
# brew install brew install waydabber/betterdisplay/betterdisplaycli # Recommended if using better display Configure [here](<plugins/display/script.sh>)
# (Also recommended for battery control - when clicking battery icon : https://github.com/mhaeuser/Battery-Toolkit)
brew install media-control macmon imagemagick
brew install --cask font-SF-Pro font-sketchybar-app-font
mkdir -p ~/.config
cd ~/.config/
git clone https://www.github.com/Kcraft059/sketchybar-config sketchybar
sketchybar --reloadFor yabai users : yabai -m config external_bar all:36:0
For Nix-Darwin users see : here or alternatively https://github.com/Kcraft059/Nix-Config/blob/master/home/darwin/sketchybar.nix
Aerospace window manager is now supported!
- You can let the config auto detect your window-manger or force it in
config.sh:
WINDOW_MANAGER="aerospace" # supported "yabai", "aerospace", and "rift"; defaults to "" which is auto-detect- For aerospace, add the following to your
~/.config/aerospace/aerospace.toml:
# Add this anywhere in your aerospace.toml file
# IMPORTANT: Must be an array format, NOT using exec-and-forget
exec-on-workspace-change = [
'/opt/homebrew/bin/bash',
'-c',
'/opt/homebrew/bin/sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE'
]- Reload both configurations:
aerospace reload-config
sketchybar --reloadNote: The setup script automatically detects the correct paths for bash and sketchybar.
- Creating workspaces: Right-clicking the separator won't create new workspaces (aerospace manages workspaces differently)
- Destroying workspaces: Right-clicking workspace items won't destroy them
- Performance: Uses efficient workspace-specific triggers instead of updating all workspaces
- Workspace switching: Click on workspace items to switch (supports both left and right click)
- Workspaces not updating: Ensure
aerospace reload-configandsketchybar --reloadhave been run after configuration changes - Click not working: Verify aerospace is in your PATH by running
which aerospace - Setup script fails: Check that both aerospace and sketchybar are properly installed via Homebrew
- Config file errors: Run
aerospace validate-configto check your aerospace.toml syntax - "Event not found" errors: Check
/tmp/sketchybar.out.logfor missing events. EnsureAEROSPACE_MODE=Trueis set in config.sh - "Permission denied" errors: Check
/tmp/sketchybar.err.log. The aerospace-script.sh file may need execute permissions:chmod +x ~/.config/sketchybar/plugins/spaces/aerospace-script.sh - Runtime errors: If you see
exec-and-forgeterrors, ensure your aerospace.toml uses the array format:["bash", "-c", "command"]not"exec-and-forget command"
-
Ensure Rift is installed and running with
rift-cliavailable in your PATH. -
The config automatically detects Rift, but you can force it in
config.sh:
WINDOW_MANAGER="rift"- Add the following to your
~/.config/rift/config.tomlto enable SketchyBar integration:
# Run commands on start
run_on_start = [
"rift-cli subscribe cli --event workspace_changed --command /bin/bash --args -c --args 'sketchybar --trigger rift_workspace_changed'",
"rift-cli subscribe cli --event windows_changed --command /bin/bash --args -c --args 'sketchybar --trigger rift_windows_changed'"
]- Reload configurations:
rift-cli service restart # Restart Rift service if needed
sketchybar --reload- Workspace switching: Click on workspace numbers to switch between workspaces
- Active workspace highlighting: Current workspace is highlighted
- Window icons: Workspaces show icons of running applications
- Dynamic workspace detection: Automatically detects available workspaces from Rift
- Event-driven updates: Responds to Rift's workspace and window change events
- Similar to Aerospace: Uses event-driven updates and workspace-specific triggers
- Workspace management: Right-clicking the separator shows a message (Rift manages workspaces differently)
- Performance: Efficient updates only when workspaces or windows change
- Integration: Native support through Rift's CLI and event system
- Workspaces not showing: Ensure
rift-cliis in your PATH and Rift is running - Click not working: Verify Rift is active and workspaces are available
- Icons not updating: Check that Rift's event subscriptions are working
- Config errors: Ensure your Rift config includes the event subscriptions (usually in
~/.config/rift/config.toml) - Permission errors: Make sure the Rift scripts have execute permissions
A lightweight config.sh (or an externally provided file via the SKETCHYBAR_CONFIG env var) now allows you to tweak common behaviors without patching the repo.
Defaults (only applied if a variable is unset):
BAR_TRANSPARENCY=true
BAR_LOOK="plain" # Aspect of the bar
NOTCH_WIDTH=180 # Reserved width for the display notch
MUSIC_INFO_WIDTH=80 # Width (px) for music title & subtitle labels
CPU_UPDATE_FREQ=2 # Seconds between CPU graph samples
MENUBAR_AUTOHIDE=True # Whether to automatically hide the menu titles
GITHUB_TOKEN="~/.github_token" # Path to your GitHub Classic token (for notifications)
WIFI_UNREDACTOR="~/Applications/wifi-unredactor.app" # Wifi unredactor pathUsage order of precedence:
- If
SKETCHYBAR_CONFIGpoints to a readable file, it is sourced. - Else if
config.shexists in the repo directory, it is sourced (see all examples in ./config-examples/). - Fallback defaults are applied inside
sketchybarrc.
You can remove or comment variables you don't want to override—defaults remain unaffected.
In the config.sh, you can choose the theme used for the bar :
COLOR_SCHEME="rosepine-moon"You can also set your own theme by adding a theme.sh file, or by specifying the path to the theme file :
COLOR_SCHEME="my-theme"
THEME_FILE_PATH="$HOME/.config/sketchybar-config/theme.sh"The file must follow the format in the example (./config-examples)
You can add native macOS menu items to the bar by modifying MENU_CONTROLS in config.sh :
MENU_CONTROLS=(
"Control__Center,FocusModes"
"Control__Center,Bluetooth"
)To get the name of the items present in the bar you can run sketchybar --query default_menu_items.
To add an item with a space in the name you must replace " " with "__", for example :
"Control Center,FocusModes" -> "Control__Center,FocusModes"
If album/title text appears clipped by the notch, increase either:
NOTCH_WIDTH(reserves more center space), orMUSIC_INFO_WIDTH(shrinks / expands label region; smaller can prevent collision with other center items).
To reload after changing values: sketchybar --reload (tip: you can also ⇧+click on the cloverleaf logo to reload the config directly from the bar).
There are multiple ways to integrate these settings through Nix flakes.
{
sketchybar-config = {
url = "github:kcraft059/sketchybar-config";
flake = false;
};
}Then deploy the repo content into ~/.config/sketchybar (via home-manager or a derivation) and drop a config.sh alongside.
An opinionated module integrating this repo as a flake input :
{ inputs, pkgs, ... }:
{
home.packages = with pkgs; [
sketchybar-app-font
];
programs.sketchybar = {
enable = true;
service = rec {
enable = true;
errorLogFile = "/tmp/sketchybar.log"; # You can remove those, but they might be usefull when bug reporting
outLogFile = errorLogFile;
};
configType = "bash";
config = {
source = "${inputs.sketchybar-config}"; # Use the flake input pointing to this repo
recursive = true; # Copy entire config tree
};
extraPackages = with pkgs; [
# menubar-cli # (needs to come from an overlay, check https://github.com/Kcraft059/Nix-Config/blob/master/overlays/menubar-cli.nix for implementation - bin by @FelixKratz)
# wifi-unredactor # (needs to come from an overlay, check https://github.com/Kcraft059/Nix-Config/blob/master/overlays/wifi-unredactor.nix for implementation - app by @noperator)
imagemagick
macmon
];
};
# Example of providing dynamic icon map or other generated files
xdg.configFile = {
"sketchybar/dyn-icon_map.sh".source = "${pkgs.sketchybar-app-font}/bin/icon_map.sh"; # To get the latest icon map for sketchybar app font
# Optional: inline user overrides without forking
# "sketchybar/config.sh".text = ''
# NOTCH_WIDTH=200
# MUSIC_INFO_WIDTH=100
# '';
};
}- Menu Bar items like
volume,wifi,bluetooth, etc are not clickable (not working on macOS 26) : Ensure the items are present in the macOS native Menu Bar so that the program can simulate a click on the item. - CPU not showing: Ensure
cpu.shis sourced (it is by default) and runsketchybar --query item graph.percentto verify presence. - Music overlapping notch: Bump
NOTCH_WIDTHin small increments (e.g. +10) or reduceMUSIC_INFO_WIDTH. - Config not applied: Echo inside your
config.shor rungrep NOTCH_WIDTH ~/.config/sketchybar/sketchybarrcto confirm dynamic variable usage.