Skip to content
Discussion options

You must be logged in to vote

ok, so keeping your if guards to only add/remove changed workspaces, then change:
EXISTING=($(sketchybar --query bar | jq -r '.items[] | select(startswith("space."))'))

to:
EXISTING=($(sketchybar --query bar | jq -r '.items[] | select(startswith("space."))' | sort -n))

finally add:

sketchbar --reorder ${EXISTING[@]}

to the end of workspace manager script. et voila!

(I also removed update_freq=1 as it was messing with my active workspace highlighting... ymmv depending on your set-up)

my complete working set-up:

#!/bin/bash

CONFIG_DIR="${CONFIG_DIR:-$HOME/.config/sketchybar}"
source "$CONFIG_DIR/colors.sh"
BUILT_IN_ID=$(aerospace list-monitors | grep "Built-in" | awk '{print $1}')

# Buil…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by LIEeOoNn
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants