Skip to content
This repository was archived by the owner on Aug 23, 2026. It is now read-only.

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple sketchybar config for aerospace users!

alt text I couldn't find any resources for a simple sketchybar config that worked with aerospace. So this is what I came up with!

The styling is really ugly, i'm sorry. Hopefully that encourages you to tinker with the setup :p

anyways if you're looking for something more fleshed out: Here's my how current configuration looks

Credits:

I'm kinda new to shell scripting and all this stuff. Here are the resources that helped me make this config besides the official sketchybar and aerospace docs :p

Aerospace:

Getting it working:

If you already have an aerospace config or don't want to use mine, add the following into your aerospace.toml to trigger sketchybar & pass workspace data.

exec-on-workspace-change = ['/bin/bash', '-c',
    'sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE PREV_WORKSPACE=$AEROSPACE_PREV_WORKSPACE'
]

You should also add --focus-follows-window to the workspace change binds. This forces the workspace to follow when a window is moved to another workspace. This will cause 'exec-on-workspace-change' to fire, keeping the bar updated. Without this, when windows are moved to a new space, they won't appear in the bar until the bar is focused. From the Aerospace guide:

"Make sure that the window in question receives focus after moving. This flag is a shortcut for manually running aerospace-workspace/aerospace-focus after move-node-to-monitor successful execution."

alt-shift-1 = 'move-node-to-workspace 1 --focus-follows-window'
alt-shift-2 = 'move-node-to-workspace 2 --focus-follows-window'
alt-shift-3 = 'move-node-to-workspace 3 --focus-follows-window'
alt-shift-4 = 'move-node-to-workspace 4 --focus-follows-window'
...

If you need multi-monitor support, extend the key binded to 'move-workspace-to-monitor' to also trigger a sketchybar event

alt-shift-tab = [
  'move-workspace-to-monitor --wrap-around next',
  'exec-and-forget sketchybar --trigger aerospace_monitor_change TARGET_MONITOR=$(aerospace list-monitors --focused --format "%{monitor-appkit-nsscreen-screens-id}") FOCUSED_WORKSPACE=$(aerospace list-workspaces --focused)',
]

You may also want to adjust your window margins if your other monitors are not of the same resolution

[gaps]
inner.horizontal = 10
inner.vertical = 10
outer.left = 20
outer.bottom = 20
outer.top = [{ monitor."BenQ EX2510" = 44 }, 14]
outer.right = 20

Sketchybar

Current Functionality:

  • Dynamically displays/hides active/inactive workspaces. (kinda jank)
  • Displays apps in each workspace
  • Displays total swap memory (updates every 20 seconds)
  • Supports multi-monitors, only showing workspace icons on the monitor the workspace is in

Getting it working:

You will need to install a Nerd Font if you haven't already!

brew tap homebrew/cask-fonts
brew install font-hack-nerd-font

jq as well!

brew install jq

I used the SF font in my config so let's install that too! If you don't want to, that's fine as well. Just remeber to change the fonts used in sketchybarrc

brew install font-sf-pro

Lastly, you'll want to grab the sketchybar app font and add it to your '~/Library/Fonts/' directory!

About

simple starting aerospace & sketchybar config

Resources

Stars

66 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages