2022-07-30 07:17:12 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# vim:fileencoding=utf-8:foldmethod=marker
|
|
|
|
PLUGIN_DIR="$HOME/.config/sketchybar/plugins"
|
|
|
|
|
|
|
|
## bar appearance {{{
|
|
|
|
sketchybar --bar \
|
|
|
|
height=32 \
|
|
|
|
blur_radius=10 \
|
|
|
|
position=top \
|
|
|
|
padding_left=0 \
|
2022-08-03 01:13:51 +02:00
|
|
|
padding_right=4
|
2022-07-30 07:17:12 +02:00
|
|
|
|
|
|
|
# colors are managed seperately in the colordummy,
|
|
|
|
# which listens to theme_changed events,
|
|
|
|
# to swap between Catppuccin Mocha and Latte
|
|
|
|
sketchybar -m --add event theme_changed AppleInterfaceThemeChangedNotification
|
|
|
|
sketchybar \
|
|
|
|
--add item colordummy left \
|
|
|
|
--set colordummy \
|
2022-08-03 01:13:51 +02:00
|
|
|
drawing=off \
|
2022-07-30 07:17:12 +02:00
|
|
|
script="$PLUGIN_DIR/colordummy.sh" \
|
|
|
|
--subscribe colordummy theme_changed
|
|
|
|
|
|
|
|
##### Changing Defaults #####
|
|
|
|
sketchybar --default \
|
|
|
|
updates=when_shown \
|
|
|
|
drawing=on \
|
|
|
|
icon.font="Symbols Nerd Font:2048-em:18.0" \
|
|
|
|
label.font="Inter:Regular:16.0" \
|
|
|
|
label.padding_left=1 \
|
|
|
|
label.padding_right=1 \
|
|
|
|
icon.padding_left=8 \
|
|
|
|
icon.padding_right=8
|
|
|
|
# }}}
|
|
|
|
|
|
|
|
## left side of the bar {{{
|
|
|
|
# spaces for yabai wm
|
|
|
|
SPACE_ICONS=(
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
)
|
|
|
|
for i in "${!SPACE_ICONS[@]}"
|
|
|
|
do
|
|
|
|
sketchybar \
|
|
|
|
--add space "space.$i" left \
|
2022-08-03 01:13:51 +02:00
|
|
|
--set "space.$i" associated_space=$((i+1)) \
|
2022-07-30 07:17:12 +02:00
|
|
|
icon="${SPACE_ICONS[i]}" \
|
|
|
|
icon.padding_left=8 \
|
|
|
|
icon.padding_right=8 \
|
2022-08-03 01:13:51 +02:00
|
|
|
background.padding_left=1 \
|
2022-07-30 07:17:12 +02:00
|
|
|
background.padding_right=1 \
|
|
|
|
background.height=32 \
|
|
|
|
label.drawing=off \
|
|
|
|
script="$PLUGIN_DIR/space.sh" \
|
2022-08-03 01:13:51 +02:00
|
|
|
click_script="yabai -m space --focus $((i+1))"
|
2022-07-30 07:17:12 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# window title
|
|
|
|
sketchybar \
|
|
|
|
--add item window_title left \
|
|
|
|
--set window_title \
|
|
|
|
background.padding_left=8 \
|
|
|
|
script="$PLUGIN_DIR/window_title.sh" \
|
|
|
|
--subscribe window_title front_app_switched
|
|
|
|
## }}}
|
|
|
|
|
|
|
|
## middle of the bar {{{
|
|
|
|
# Apple Music Status
|
|
|
|
sketchybar -m --add event song_update com.apple.Music.playerInfo
|
|
|
|
sketchybar \
|
|
|
|
--add item music center \
|
|
|
|
--set music \
|
|
|
|
label.font="Victor Mono:Bold Italic:16.0" \
|
|
|
|
script="$PLUGIN_DIR/music.sh" \
|
|
|
|
--subscribe music song_update
|
|
|
|
# }}}
|
|
|
|
|
|
|
|
## right side of the bar {{{
|
|
|
|
# this starts at the rightmost item
|
|
|
|
# items should be self explanatory by their name, and are separated by a blank line
|
|
|
|
sketchybar \
|
|
|
|
\
|
|
|
|
--add item clock right \
|
|
|
|
--set clock \
|
|
|
|
script="$PLUGIN_DIR/clock.sh" \
|
|
|
|
update_freq=10 \
|
2022-08-03 01:13:51 +02:00
|
|
|
lazy=true \
|
2022-07-30 07:17:12 +02:00
|
|
|
\
|
|
|
|
--add item date right \
|
|
|
|
--set date \
|
|
|
|
script="$PLUGIN_DIR/ddate.sh" \
|
|
|
|
update_freq=60 \
|
2022-08-03 01:13:51 +02:00
|
|
|
lazy=true \
|
2022-07-30 07:17:12 +02:00
|
|
|
\
|
|
|
|
--add item mullvad right \
|
|
|
|
--set mullvad \
|
|
|
|
script="$PLUGIN_DIR/mullvad.sh" \
|
2022-08-20 02:55:59 +02:00
|
|
|
update_freq=30 \
|
2022-07-30 07:17:12 +02:00
|
|
|
\
|
|
|
|
--add item battery right \
|
|
|
|
--set battery \
|
|
|
|
update_freq=30 \
|
|
|
|
script="$PLUGIN_DIR/battery.sh" \
|
2022-08-03 01:13:51 +02:00
|
|
|
lazy=true \
|
2022-10-21 17:36:10 +02:00
|
|
|
--subscribe battery system_woke
|
2022-07-30 07:17:12 +02:00
|
|
|
|
|
|
|
##### fin #####
|
|
|
|
sketchybar --update
|