Skip to content

Question: Query the current mode/workspace #650

Discussion options

You must be logged in to vote

Take a look here: https://nikitabobko.github.io/AeroSpace/goodness#show-aerospace-workspaces-in-sketchybar

I haven't updated my dotfiles yet but this is what I have so far:

make sure to edit your aerospace config file with:

# Notify Sketchybar about workspace change
exec-on-workspace-change = [
  '/bin/bash',
  '-c',
  'sketchybar --trigger aerospace_workspace_change FOCUSED=$AEROSPACE_FOCUSED_WORKSPACE',
]

items/aerospace_workspace.sh

#!/usr/bin/env bash

# Workspace names
get_workspace_name() {
    case "$1" in
    "1") echo "Web" ;;
    "2") echo "Misc" ;;
    "3") echo "Code" ;;
    "4") echo "Media" ;;
    *) echo "$1" ;; # Default to SID
    esac
}

# Workspace icons
get_workspace_icon

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lpturmel
Comment options

Answer selected by lpturmel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants