worf: Update yabay/sketchybar/alacritty config

This commit is contained in:
2025-02-18 21:41:32 +01:00
parent da2ca7f42e
commit 47db333feb
31 changed files with 1612 additions and 15 deletions

View File

@@ -0,0 +1,44 @@
#!/bin/bash
POPUP_OFF='sketchybar --set apple.logo popup.drawing=off'
POPUP_CLICK_SCRIPT='sketchybar --set $NAME popup.drawing=toggle'
apple_logo=(
icon=$APPLE
icon.font="$FONT:Black:16.0"
icon.color=$GREEN
padding_right=15
label.drawing=off
click_script="$POPUP_CLICK_SCRIPT"
popup.height=35
)
apple_prefs=(
icon=$PREFERENCES
label="Preferences"
click_script="open -a 'System Preferences'; $POPUP_OFF"
)
apple_activity=(
icon=$ACTIVITY
label="Activity"
click_script="open -a 'Activity Monitor'; $POPUP_OFF"
)
apple_lock=(
icon=$LOCK
label="Lock Screen"
click_script="pmset displaysleepnow; $POPUP_OFF"
)
sketchybar --add item apple.logo left \
--set apple.logo "${apple_logo[@]}" \
\
--add item apple.prefs popup.apple.logo \
--set apple.prefs "${apple_prefs[@]}" \
\
--add item apple.activity popup.apple.logo \
--set apple.activity "${apple_activity[@]}" \
\
--add item apple.lock popup.apple.logo \
--set apple.lock "${apple_lock[@]}"

View File

@@ -0,0 +1,15 @@
#!/bin/bash
battery=(
script="$PLUGIN_DIR/battery.sh"
icon.font="$FONT:Regular:19.0"
padding_right=5
padding_left=0
label.drawing=off
update_freq=120
updates=on
)
sketchybar --add item battery right \
--set battery "${battery[@]}" \
--subscribe battery power_source_change system_woke

View File

@@ -0,0 +1,17 @@
#!/bin/bash
calendar=(
icon=cal
icon.font="$FONT:Black:12.0"
icon.padding_right=0
label.width=45
label.align=right
padding_left=15
update_freq=30
script="$PLUGIN_DIR/calendar.sh"
click_script="$PLUGIN_DIR/zen.sh"
)
sketchybar --add item calendar right \
--set calendar "${calendar[@]}" \
--subscribe calendar system_woke

View File

@@ -0,0 +1,53 @@
#!/bin/bash
cpu_top=(
label.font="$FONT:Bold:7"
label=CPU
icon.drawing=off
width=0
padding_right=15
y_offset=6
)
cpu_percent=(
label.font="$FONT:Bold:12"
label=CPU
y_offset=-4
padding_right=15
width=55
icon.drawing=off
update_freq=4
mach_helper="$HELPER"
)
cpu_sys=(
width=0
graph.color=$RED
graph.fill_color=$RED
label.drawing=off
icon.drawing=off
background.height=30
background.drawing=on
background.color=$TRANSPARENT
)
cpu_user=(
graph.color=$BLUE
label.drawing=off
icon.drawing=off
background.height=30
background.drawing=on
background.color=$TRANSPARENT
)
sketchybar --add item cpu.top right \
--set cpu.top "${cpu_top[@]}" \
\
--add item cpu.percent right \
--set cpu.percent "${cpu_percent[@]}" \
\
--add graph cpu.sys right 75 \
--set cpu.sys "${cpu_sys[@]}" \
\
--add graph cpu.user right 75 \
--set cpu.user "${cpu_user[@]}"

View File

@@ -0,0 +1,13 @@
#!/bin/bash
front_app=(
label.font="$FONT:Bold:12.0"
icon.background.drawing=on
display=active
script="$PLUGIN_DIR/front_app.sh"
click_script="open -a 'Mission Control'"
)
sketchybar --add item front_app left \
--set front_app "${front_app[@]}" \
--subscribe front_app front_app_switched

View File

@@ -0,0 +1,13 @@
media=(
icon.background.drawing=on
icon.background.image=media.artwork
icon.background.image.corner_radius=9
script="$PLUGIN_DIR/media.sh"
label.max_chars=15
scroll_texts=on
updates=on
)
sketchybar --add item media center \
--set media "${media[@]}" \
--subscribe media media_change

View File

@@ -0,0 +1,51 @@
#!/bin/bash
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9")
# Destroy space on right click, focus space on left click.
# New space by left clicking separator (>)
sid=0
spaces=()
for i in "${!SPACE_ICONS[@]}"
do
sid=$(($i+1))
space=(
space=$sid
icon="${SPACE_ICONS[i]}"
icon.padding_left=10
icon.padding_right=10
padding_left=2
padding_right=2
label.padding_right=20
icon.highlight_color=$RED
label.color=$GREY
label.highlight_color=$WHITE
label.font="sketchybar-app-font:Regular:16.0"
label.y_offset=-1
background.color=$BACKGROUND_1
background.border_color=$BACKGROUND_2
script="$PLUGIN_DIR/space.sh"
)
sketchybar --add space space.$sid left \
--set space.$sid "${space[@]}" \
--subscribe space.$sid mouse.clicked
done
space_creator=(
icon=􀆊
icon.font="$FONT:Heavy:16.0"
padding_left=10
padding_right=8
label.drawing=off
display=active
click_script='yabai -m space --create'
script="$PLUGIN_DIR/space_windows.sh"
icon.color=$WHITE
)
sketchybar --add item space_creator left \
--set space_creator "${space_creator[@]}" \
--subscribe space_creator space_windows_change

View File

@@ -0,0 +1,202 @@
#!/bin/bash
SPOTIFY_EVENT="com.spotify.client.PlaybackStateChanged"
POPUP_SCRIPT="sketchybar -m --set spotify.anchor popup.drawing=toggle"
spotify_anchor=(
script="$PLUGIN_DIR/spotify.sh"
click_script="$POPUP_SCRIPT"
popup.horizontal=on
popup.align=center
popup.height=150
icon=􁁒
icon.font="$FONT:Regular:25.0"
label.drawing=off
drawing=off
y_offset=2
)
spotify_cover=(
script="$PLUGIN_DIR/spotify.sh"
click_script="open -a 'Spotify'; $POPUP_SCRIPT"
label.drawing=off
icon.drawing=off
padding_left=12
padding_right=10
background.image.scale=0.2
background.image.drawing=on
background.drawing=on
background.image.corner_radius=9
shadow=on
)
spotify_title=(
icon.drawing=off
padding_left=0
padding_right=0
width=0
label.font="$FONT:Heavy:15.0"
label.max_chars=20
y_offset=55
)
spotify_artist=(
icon.drawing=off
y_offset=30
padding_left=0
padding_right=0
width=0
label.max_chars=20
)
spotify_album=(
icon.drawing=off
padding_left=0
padding_right=0
y_offset=15
width=0
label.max_chars=25
)
spotify_state=(
icon.drawing=on
icon.font="$FONT:Light Italic:10.0"
icon.width=35
icon="00:00"
label.drawing=on
label.font="$FONT:Light Italic:10.0"
label.width=35
label="00:00"
padding_left=0
padding_right=0
y_offset=-15
width=0
slider.background.height=6
slider.background.corner_radius=1
slider.background.color=$GREY
slider.highlight_color=$GREEN
slider.percentage=40
slider.width=115
script="$PLUGIN_DIR/spotify.sh"
update_freq=1
updates=when_shown
)
spotify_shuffle=(
icon=􀊝
icon.padding_left=5
icon.padding_right=5
icon.color=$BLACK
icon.highlight_color=$GREY
label.drawing=off
script="$PLUGIN_DIR/spotify.sh"
y_offset=-45
)
spotify_back=(
icon=􀊎
icon.padding_left=5
icon.padding_right=5
icon.color=$BLACK
script="$PLUGIN_DIR/spotify.sh"
label.drawing=off
y_offset=-45
)
spotify_play=(
icon=􀊔
background.height=40
background.corner_radius=20
width=40
align=center
background.color=$POPUP_BACKGROUND_COLOR
background.border_color=$WHITE
background.border_width=0
background.drawing=on
icon.padding_left=4
icon.padding_right=5
updates=on
label.drawing=off
script="$PLUGIN_DIR/spotify.sh"
y_offset=-45
)
spotify_next=(
icon=􀊐
icon.padding_left=5
icon.padding_right=5
icon.color=$BLACK
label.drawing=off
script="$PLUGIN_DIR/spotify.sh"
y_offset=-45
)
spotify_repeat=(
icon=􀊞
icon.highlight_color=$GREY
icon.padding_left=5
icon.padding_right=10
icon.color=$BLACK
label.drawing=off
script="$PLUGIN_DIR/spotify.sh"
y_offset=-45
)
spotify_controls=(
background.color=$GREEN
background.corner_radius=11
background.drawing=on
y_offset=-45
)
sketchybar --add event spotify_change $SPOTIFY_EVENT \
--add item spotify.anchor center \
--set spotify.anchor "${spotify_anchor[@]}" \
--subscribe spotify.anchor mouse.entered mouse.exited \
mouse.exited.global \
\
--add item spotify.cover popup.spotify.anchor \
--set spotify.cover "${spotify_cover[@]}" \
\
--add item spotify.title popup.spotify.anchor \
--set spotify.title "${spotify_title[@]}" \
\
--add item spotify.artist popup.spotify.anchor \
--set spotify.artist "${spotify_artist[@]}" \
\
--add item spotify.album popup.spotify.anchor \
--set spotify.album "${spotify_album[@]}" \
\
--add slider spotify.state popup.spotify.anchor \
--set spotify.state "${spotify_state[@]}" \
--subscribe spotify.state mouse.clicked \
\
--add item spotify.shuffle popup.spotify.anchor \
--set spotify.shuffle "${spotify_shuffle[@]}" \
--subscribe spotify.shuffle mouse.clicked \
\
--add item spotify.back popup.spotify.anchor \
--set spotify.back "${spotify_back[@]}" \
--subscribe spotify.back mouse.clicked \
\
--add item spotify.play popup.spotify.anchor \
--set spotify.play "${spotify_play[@]}" \
--subscribe spotify.play mouse.clicked spotify_change \
\
--add item spotify.next popup.spotify.anchor \
--set spotify.next "${spotify_next[@]}" \
--subscribe spotify.next mouse.clicked \
\
--add item spotify.repeat popup.spotify.anchor \
--set spotify.repeat "${spotify_repeat[@]}" \
--subscribe spotify.repeat mouse.clicked \
\
--add item spotify.spacer popup.spotify.anchor \
--set spotify.spacer width=5 \
\
--add bracket spotify.controls spotify.shuffle \
spotify.back \
spotify.play \
spotify.next \
spotify.repeat \
--set spotify.controls "${spotify_controls[@]}" \

View File

@@ -0,0 +1,44 @@
#!/bin/bash
volume_slider=(
script="$PLUGIN_DIR/volume.sh"
updates=on
label.drawing=off
icon.drawing=off
slider.highlight_color=$BLUE
slider.background.height=5
slider.background.corner_radius=3
slider.background.color=$BACKGROUND_2
slider.knob=􀀁
slider.knob.drawing=on
)
volume_icon=(
click_script="$PLUGIN_DIR/volume_click.sh"
padding_left=10
icon=$VOLUME_100
icon.width=0
icon.align=left
icon.color=$GREY
icon.font="$FONT:Regular:14.0"
label.width=25
label.align=left
label.font="$FONT:Regular:14.0"
)
status_bracket=(
background.color=$BACKGROUND_1
background.border_color=$BACKGROUND_2
)
sketchybar --add slider volume right \
--set volume "${volume_slider[@]}" \
--subscribe volume volume_change \
mouse.clicked \
\
--add item volume_icon right \
--set volume_icon "${volume_icon[@]}"
# sketchybar --add bracket status brew github.bell wifi volume_icon \
sketchybar --add bracket status wifi volume_icon \
--set status "${status_bracket[@]}"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
source "$CONFIG_DIR/icons.sh"
wifi=(
padding_right=7
label.width=0
icon="$WIFI_DISCONNECTED"
script="$PLUGIN_DIR/wifi.sh"
)
sketchybar --add item wifi right \
--set wifi "${wifi[@]}" \
--subscribe wifi wifi_change mouse.clicked

View File

@@ -0,0 +1,15 @@
#!/bin/bash
yabai=(
icon.width=0
label.width=0
script="$PLUGIN_DIR/yabai.sh"
icon.font="$FONT:Bold:16.0"
display=active
)
sketchybar --add event window_focus \
--add item yabai left \
--set yabai "${yabai[@]}" \
--subscribe yabai window_focus \
mouse.clicked