bar was too low before, which looked weird when having windows right up against the notch, this ensures the bar only takes up area in the height the notch takes up
116 lines
2.8 KiB
Bash
Executable file
116 lines
2.8 KiB
Bash
Executable file
# vim: set filetype=sh :
|
|
PLUGIN_DIR="$HOME/dots/stow/.config/sketchybar/plugins"
|
|
source $PLUGIN_DIR/../colours.sh # bar colours
|
|
|
|
sketchybar --bar \
|
|
position=top \
|
|
height=42 \
|
|
blur_radius=0 \
|
|
color=0x00000000 \
|
|
padding_right=15 \
|
|
padding_left=15 \
|
|
y_offset=-2 \
|
|
corner_radius=0 \
|
|
|
|
default=(
|
|
icon.font="ComicShannsMono Nerd Font:Regular:16.0"
|
|
label.font="$FONT:Bold:12.0"
|
|
label.color=$PRIMARY_COLOUR
|
|
icon.color=$SECONDARY_COLOUR
|
|
background.color=$BACKGROUND_COLOUR
|
|
background.corner_radius=$ROUNDING
|
|
background.border_color=0x00000000
|
|
background.border_width=3
|
|
|
|
background.height=32
|
|
background.padding_right=0
|
|
background.padding_left=0
|
|
|
|
icon.padding_left=10
|
|
icon.padding_right=1
|
|
label.padding_left=7
|
|
label.padding_right=7
|
|
)
|
|
sketchybar --default "${default[@]}"
|
|
|
|
#
|
|
# Left Items
|
|
#
|
|
|
|
# Yabai Workspace Indictators
|
|
#
|
|
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9")
|
|
for i in "${!SPACE_ICONS[@]}"
|
|
do
|
|
sid="$(($i+1))"
|
|
space=(
|
|
space="$sid"
|
|
icon="${SPACE_ICONS[i]}"
|
|
icon.drawing=false \
|
|
background.height=29 \
|
|
background.border_width=0 \
|
|
background.padding_right=0 \
|
|
background.padding_left=0 \
|
|
label.color=$PRIMARY_COLOUR \
|
|
label="$sid" \
|
|
script="$PLUGIN_DIR/space.sh"
|
|
click_script="yabai -m space --focus $sid"
|
|
)
|
|
sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}"
|
|
done
|
|
|
|
|
|
# Focused window title
|
|
sketchybar --add item front_app left \
|
|
--set front_app icon=" " script="$PLUGIN_DIR/front_app.sh" \
|
|
--subscribe front_app front_app_switched
|
|
|
|
# Currently playing music status (only works for Music.app)
|
|
sketchybar --add item music left \
|
|
--set music icon=" " update_freq=10 \
|
|
script="$PLUGIN_DIR/music.sh" \
|
|
click_script="osascript -e 'tell application \"Music\" to playpause'" \
|
|
scroll_texts=1 \
|
|
label.max_chars=50 \
|
|
label.scroll_duration=500 \
|
|
background.color=$PRIMARY_COLOUR \
|
|
icon.color=$BACKGROUND_COLOUR \
|
|
label.color=$BACKGROUND_COLOUR \
|
|
drawing=false
|
|
|
|
#
|
|
# Right Items
|
|
#
|
|
|
|
# Clock
|
|
sketchybar --add item clock right \
|
|
--set clock icon=" " \
|
|
update_freq=10 \
|
|
label.padding_right=10 \
|
|
script="$PLUGIN_DIR/clock.sh"
|
|
|
|
# Input Method
|
|
sketchybar --add item input-method right \
|
|
--set input-method icon="" \
|
|
update_freq=1 \
|
|
script="$PLUGIN_DIR/input-method.sh"
|
|
|
|
# Battery
|
|
sketchybar --add item battery right \
|
|
--set battery update_freq=10 \
|
|
script="$PLUGIN_DIR/battery.sh" \
|
|
|
|
# Backlight
|
|
sketchybar --add item backlight right \
|
|
--set backlight icon="" \
|
|
script="$PLUGIN_DIR/backlight.sh" \
|
|
--subscribe backlight brightness_change \
|
|
|
|
# Volume
|
|
sketchybar --add item audio right \
|
|
--set audio \
|
|
script="$PLUGIN_DIR/volume.sh" \
|
|
--subscribe audio volume_change \
|
|
|
|
##### Force all scripts to run the first time (never do this in a script) #####
|
|
sketchybar --update
|