dotfiles/modules/sketchybar/sketchybarrc

89 lines
2 KiB
Text
Raw Normal View History

2022-07-30 07:17:12 +02:00
#!/usr/bin/env bash
# vim:fileencoding=utf-8:foldmethod=marker
2022-12-01 07:58:02 +01:00
PLUGIN_DIR="$HOME"/.config/sketchybar/plugins
2022-07-30 07:17:12 +02:00
## bar appearance {{{
sketchybar --bar \
2023-02-10 09:13:56 +01:00
height=32 \
position=top \
padding_left=0 \
padding_right=0 \
hidden=off \
topmost=on
2022-07-30 07:17:12 +02:00
# colors are managed separately in the colordummy,
2022-07-30 07:17:12 +02:00
# which listens to theme_changed events,
# to swap between Catppuccin Mocha and Latte
sketchybar -m --add event theme_changed AppleInterfaceThemeChangedNotification
sketchybar \
2023-02-10 09:13:56 +01:00
--add item colordummy center \
--set colordummy \
drawing=off \
script="$PLUGIN_DIR/colordummy.sh" \
--subscribe colordummy theme_changed
2022-07-30 07:17:12 +02:00
##### Changing Defaults #####
sketchybar --default \
2023-02-10 09:13:56 +01:00
updates=when_shown \
drawing=on \
icon.font="Symbols Nerd Font:2048-em:18.0" \
label.font="SF Pro:Regular:16.0" \
label.padding_left=2 \
label.padding_right=2 \
icon.padding_left=2 \
icon.padding_right=2
2022-07-30 07:17:12 +02:00
# }}}
## left side of the bar {{{
# spaces for yabai wm
SPACE_ICONS=(
2023-02-10 09:13:56 +01:00
""
"Ⅱ"
"Ⅲ"
"Ⅳ"
""
"Ⅵ"
"Ⅶ"
"Ⅷ"
"Ⅸ"
""
2022-07-30 07:17:12 +02:00
)
2022-12-01 07:58:02 +01:00
for i in "${!SPACE_ICONS[@]}"; do
2023-02-10 09:13:56 +01:00
sketchybar \
--add space "space.$i" left \
--set "space.$i" associated_space=$((i + 1)) \
icon="${SPACE_ICONS[i]}" \
icon.padding_left=8 \
icon.padding_right=8 \
background.padding_left=1 \
background.padding_right=1 \
background.height=32 \
label.drawing=off \
script="$PLUGIN_DIR/space.sh" \
click_script="yabai -m space --focus $((i + 1))"
2022-07-30 07:17:12 +02:00
done
sketchybar \
2023-02-10 09:13:56 +01:00
--add item music center \
--set music \
script="$PLUGIN_DIR/music.sh" \
--add item clock right \
--set clock \
script="$PLUGIN_DIR/clock.sh" \
update_freq=10 \
background.padding_right=4 \
--add alias "iStat Menus Status" right \
icon.padding_left=0 \
icon.padding_right=0 \
--add alias "Little Snitch Agent" right \
icon.padding_left=0 \
icon.padding_right=0 \
--add alias "Control Centre,Battery" right \
icon.padding_left=0 \
icon.padding_right=0 \
--add alias "Mullvad VPN" right \
icon.padding_left=0 \
icon.padding_right=0
2022-07-30 07:17:12 +02:00
sketchybar --update