Skip to content

Commit

Permalink
add sketchybar docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasGrandl committed Jan 1, 2024
1 parent 5c0726a commit 17ac33a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/goodness.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,41 @@ The list is useful to compose custom xref:guide.adoc#on-window-detected-callback
|kdenlive|`org.kde.Kdenlive`

|===

[#sketchybar-example]
== Sketchybar Example

For those of you who want to integrate AeroSpace workspace indicators into your Sketchybar.
This example is equivalent in look & behavior to the default Sketchybar Mission Control Spaces example.

[source,bash]
----
# ~/.config/sketchybar/sketchybarrc
# Add AeroSpace workspace event
sketchybar --add event aerospace_change bobko.debug.aerospace.WorkspaceFocus
# Add Workspaces
for sid in $(aerospace list-workspaces); do
sketchybar --add item space.$sid left \
--subscribe space.$sid aerospace_change \
--set space.$sid \
background.color=0x44ffffff \
background.corner_radius=5 \
background.height=20 \
background.drawing=off \
label="$sid" \
click_script="aerospace workspace $sid" \
script="$PLUGIN_DIR/aerospace.sh $sid"
done
# ~/.config/sketchybar/plugins/aerospace.sh
# make sure it's executable with chmod +x ~/.config/sketchybar/plugins/aerospace.sh
SID=$1
FOCUSED=$(echo $INFO | jq -r '.workspace')
bg="0xff585b70"
if [ "$SID" = "$FOCUSED" ]; then
sketchybar --set $NAME background.drawing=$SELECTED
fi
----

0 comments on commit 17ac33a

Please sign in to comment.