···11+# This is a demo config to showcase some of the most important commands.
22+# It is meant to be changed and configured, as it is intentionally kept sparse.
33+# For a (much) more advanced configuration example see my dotfiles:
44+# https://github.com/FelixKratz/dotfiles
55+66+PLUGIN_DIR="$CONFIG_DIR/plugins"
77+88+##### Bar Appearance #####
99+# Configuring the general appearance of the bar.
1010+# These are only some of the options available. For all options see:
1111+# https://felixkratz.github.io/SketchyBar/config/bar
1212+# If you are looking for other colors, see the color picker:
1313+# https://felixkratz.github.io/SketchyBar/config/tricks#color-picker
1414+1515+sketchybar --bar position=top height=38 blur_radius=30 color=0x40000000
1616+1717+##### Changing Defaults #####
1818+# We now change some default values, which are applied to all further items.
1919+# For a full list of all available item properties see:
2020+# https://felixkratz.github.io/SketchyBar/config/items
2121+2222+default=(
2323+ padding_left=5
2424+ padding_right=5
2525+ icon.font="Hack Nerd Font:Bold:17.0"
2626+ label.font="Hack Nerd Font:Bold:14.0"
2727+ icon.color=0xffffffff
2828+ label.color=0xffffffff
2929+ icon.padding_left=4
3030+ icon.padding_right=4
3131+ label.padding_left=4
3232+ label.padding_right=4
3333+)
3434+sketchybar --default "${default[@]}"
3535+3636+##### Aerospace Workspaces #####
3737+sketchybar --add event aerospace_workspace_change
3838+3939+for sid in $(aerospace list-workspaces --all); do
4040+ sketchybar --add item space.$sid left \
4141+ --subscribe space.$sid aerospace_workspace_change \
4242+ --set space.$sid \
4343+ background.color=0x44ffffff \
4444+ background.corner_radius=5 \
4545+ background.height=20 \
4646+ background.drawing=off \
4747+ label="$sid" \
4848+ click_script="aerospace workspace $sid"
4949+done
5050+5151+##### Adding Left Items #####
5252+# We add some regular items to the left side of the bar, where
5353+# only the properties deviating from the current defaults need to be set
5454+5555+# sketchybar --add item chevron left \
5656+# --set chevron icon= label.drawing=off \
5757+# --add item front_app left \
5858+# --set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
5959+# --subscribe front_app front_app_switched
6060+6161+##### Adding Right Items #####
6262+# In the same way as the left items we can add items to the right side.
6363+# Additional position (e.g. center) are available, see:
6464+# https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar
6565+6666+# Some items refresh on a fixed cycle, e.g. the clock runs its script once
6767+# every 10s. Other items respond to events they subscribe to, e.g. the
6868+# volume.sh script is only executed once an actual change in system audio
6969+# volume is registered. More info about the event system can be found here:
7070+# https://felixkratz.github.io/SketchyBar/config/events
7171+7272+# sketchybar --add item clock right \
7373+# --set clock update_freq=10 icon= script="$PLUGIN_DIR/clock.sh" \
7474+# --add item volume right \
7575+# --set volume script="$PLUGIN_DIR/volume.sh" \
7676+# --subscribe volume volume_change \
7777+# --add item battery right \
7878+# --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
7979+# --subscribe battery system_woke power_source_change
8080+8181+##### Force all scripts to run the first time (never do this in a script) #####
8282+sketchybar --update
···5858 }
59596060 // Uncomment this to make the mouse warp to the center of newly focused windows.
6161- warp-mouse-to-focus
6161+ //warp-mouse-to-focus
62626363 // Focus windows and outputs automatically when moving the mouse into them.
6464 // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.