mirror of
https://github.com/mr0xb/dotfiles.git
synced 2026-08-27 19:34:57 -04:00
updates
This commit is contained in:
parent
bc4d4c403a
commit
715eb53860
57 changed files with 7755 additions and 3 deletions
107
.config/sketchybar/items/aerospace.sh
Executable file
107
.config/sketchybar/items/aerospace.sh
Executable file
|
|
@ -0,0 +1,107 @@
|
|||
#!/bin/bash
|
||||
|
||||
CONFIG_DIR="${CONFIG_DIR:-$HOME/.config/sketchybar}"
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
# ─── Fast path: workspace switch (color-only update) ─────────────────────────
|
||||
# When called from exec-on-workspace-change, FOCUSED_WORKSPACE and
|
||||
# PREV_WORKSPACE are passed as env vars. We can swap highlight colors
|
||||
# with ZERO aerospace CLI calls — just one sketchybar call (~10ms).
|
||||
if [ -n "$FOCUSED_WORKSPACE" ] && [ -n "$PREV_WORKSPACE" ] \
|
||||
&& [ "$FOCUSED_WORKSPACE" != "$PREV_WORKSPACE" ]; then
|
||||
sketchybar --animate sin 8 \
|
||||
--set aerospace.workspace.$PREV_WORKSPACE \
|
||||
background.color=$BACKGROUND_2 \
|
||||
icon.color=$WHITE \
|
||||
label.color=$WHITE \
|
||||
--set aerospace.workspace.$FOCUSED_WORKSPACE \
|
||||
background.color=$GREEN \
|
||||
icon.color=$BLACK \
|
||||
label.color=$BLACK
|
||||
fi
|
||||
|
||||
# ─── Full path: initial load / icon refresh ──────────────────────────────────
|
||||
# Only source the 986-line icon map when we actually need it.
|
||||
source "$CONFIG_DIR/helpers/icon_map.sh"
|
||||
|
||||
# Use env var if available, otherwise query (1 call)
|
||||
CURRENT_WORKSPACE="${FOCUSED_WORKSPACE:-$(aerospace list-workspaces --focused 2>/dev/null)}" || exit
|
||||
[ -z "$CURRENT_WORKSPACE" ] && exit
|
||||
|
||||
# ONE aerospace call gets every window across all workspaces
|
||||
ALL_WINDOWS=$(aerospace list-windows --all --format '%{workspace}|%{app-name}' 2>/dev/null)
|
||||
|
||||
# Parse into per-workspace app lists — pure bash, no subprocesses
|
||||
# (bash 3.2 compatible: no associative arrays)
|
||||
WS_1_APPS="" WS_2_APPS="" WS_3_APPS="" WS_4_APPS="" WS_5_APPS=""
|
||||
WS_6_APPS="" WS_7_APPS="" WS_8_APPS="" WS_9_APPS=""
|
||||
WS_1_ACT=0 WS_2_ACT=0 WS_3_ACT=0 WS_4_ACT=0 WS_5_ACT=0
|
||||
WS_6_ACT=0 WS_7_ACT=0 WS_8_ACT=0 WS_9_ACT=0
|
||||
|
||||
while IFS='|' read -r ws app; do
|
||||
[ -z "$ws" ] && continue
|
||||
case "$ws" in
|
||||
1) WS_1_ACT=1; WS_1_APPS="${WS_1_APPS:+${WS_1_APPS}|}$app" ;;
|
||||
2) WS_2_ACT=1; WS_2_APPS="${WS_2_APPS:+${WS_2_APPS}|}$app" ;;
|
||||
3) WS_3_ACT=1; WS_3_APPS="${WS_3_APPS:+${WS_3_APPS}|}$app" ;;
|
||||
4) WS_4_ACT=1; WS_4_APPS="${WS_4_APPS:+${WS_4_APPS}|}$app" ;;
|
||||
5) WS_5_ACT=1; WS_5_APPS="${WS_5_APPS:+${WS_5_APPS}|}$app" ;;
|
||||
6) WS_6_ACT=1; WS_6_APPS="${WS_6_APPS:+${WS_6_APPS}|}$app" ;;
|
||||
7) WS_7_ACT=1; WS_7_APPS="${WS_7_APPS:+${WS_7_APPS}|}$app" ;;
|
||||
8) WS_8_ACT=1; WS_8_APPS="${WS_8_APPS:+${WS_8_APPS}|}$app" ;;
|
||||
9) WS_9_ACT=1; WS_9_APPS="${WS_9_APPS:+${WS_9_APPS}|}$app" ;;
|
||||
esac
|
||||
done <<< "$ALL_WINDOWS"
|
||||
|
||||
# Always show the focused workspace even if empty
|
||||
case "$CURRENT_WORKSPACE" in
|
||||
[1-9]) eval "WS_${CURRENT_WORKSPACE}_ACT=1" ;;
|
||||
esac
|
||||
|
||||
# Build ONE sketchybar call for all 9 workspaces
|
||||
args=(--animate sin 8)
|
||||
|
||||
for i in {1..9}; do
|
||||
eval "IS_ACTIVE=\$WS_${i}_ACT"
|
||||
|
||||
if [ "$IS_ACTIVE" = "1" ]; then
|
||||
eval "APPS_STR=\$WS_${i}_APPS"
|
||||
|
||||
# Build icon strip (up to 3 app icons)
|
||||
ICON_STRIP=""
|
||||
APP_COUNT=0
|
||||
OLD_IFS="$IFS"; IFS='|'
|
||||
for APP in $APPS_STR; do
|
||||
[ -z "$APP" ] && continue
|
||||
APP_COUNT=$((APP_COUNT + 1))
|
||||
[ $APP_COUNT -gt 3 ] && break
|
||||
__icon_map "$APP"
|
||||
if [ -n "$icon_result" ] && [ "$icon_result" != ":default:" ]; then
|
||||
ICON_STRIP="${ICON_STRIP}${icon_result} "
|
||||
fi
|
||||
done
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
ICON_STRIP="${ICON_STRIP% }"
|
||||
[ -z "$ICON_STRIP" ] && ICON_STRIP="$i"
|
||||
|
||||
if [ "$i" = "$CURRENT_WORKSPACE" ]; then
|
||||
BG_COLOR=$GREEN; ICON_COLOR=$BLACK; TEXT_COLOR=$BLACK
|
||||
else
|
||||
BG_COLOR=$BACKGROUND_2; ICON_COLOR=$WHITE; TEXT_COLOR=$WHITE
|
||||
fi
|
||||
|
||||
args+=(
|
||||
--set aerospace.workspace.$i drawing=on
|
||||
--set aerospace.workspace.$i icon="$ICON_STRIP"
|
||||
--set aerospace.workspace.$i icon.color="$ICON_COLOR"
|
||||
--set aerospace.workspace.$i label="$i"
|
||||
--set aerospace.workspace.$i label.color="$TEXT_COLOR"
|
||||
--set aerospace.workspace.$i background.color="$BG_COLOR"
|
||||
)
|
||||
else
|
||||
args+=(--set aerospace.workspace.$i drawing=off)
|
||||
fi
|
||||
done
|
||||
|
||||
sketchybar "${args[@]}" 2>/dev/null
|
||||
62
.config/sketchybar/items/apple.sh
Executable file
62
.config/sketchybar/items/apple.sh
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
POPUP_OFF="sketchybar --set apple.icon popup.drawing=off"
|
||||
POPUP_CLICK_SCRIPT="sketchybar --set \$NAME popup.drawing=toggle"
|
||||
|
||||
# Apple icon (far left) - opens popup menu on click
|
||||
apple_icon=(
|
||||
icon=""
|
||||
icon.drawing=on
|
||||
icon.font="SF Pro:Black:28.0"
|
||||
icon.color=$GREEN
|
||||
label.drawing=off
|
||||
background.drawing=off
|
||||
padding_right=4
|
||||
padding_left=10
|
||||
click_script="$POPUP_CLICK_SCRIPT"
|
||||
)
|
||||
|
||||
apple_logo=(
|
||||
icon.drawing=off
|
||||
label.drawing=off
|
||||
padding_right=0
|
||||
padding_left=0
|
||||
width=0
|
||||
)
|
||||
|
||||
apple_prefs=(
|
||||
icon="⚙️"
|
||||
label="System Preferences"
|
||||
click_script="open 'x-apple.systempreferences:'; $POPUP_OFF"
|
||||
)
|
||||
|
||||
apple_activity=(
|
||||
icon="📊"
|
||||
label="Activity Monitor"
|
||||
click_script="open -a 'Activity Monitor'; $POPUP_OFF"
|
||||
)
|
||||
|
||||
apple_lock=(
|
||||
icon="🔒"
|
||||
label="Lock Screen"
|
||||
click_script="open -a ScreenSaverEngine; $POPUP_OFF"
|
||||
)
|
||||
|
||||
# Add apple icon first (far left)
|
||||
sketchybar --add item apple.icon left \
|
||||
--set apple.icon "${apple_icon[@]}"
|
||||
|
||||
sketchybar --add item apple.logo left \
|
||||
--set apple.logo "${apple_logo[@]}" \
|
||||
\
|
||||
--add item apple.prefs popup.apple.icon \
|
||||
--set apple.prefs "${apple_prefs[@]}" \
|
||||
\
|
||||
--add item apple.activity popup.apple.icon \
|
||||
--set apple.activity "${apple_activity[@]}" \
|
||||
\
|
||||
--add item apple.lock popup.apple.icon \
|
||||
--set apple.lock "${apple_lock[@]}"
|
||||
28
.config/sketchybar/items/battery.sh
Executable file
28
.config/sketchybar/items/battery.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
battery=(
|
||||
script="$PLUGIN_DIR/battery.sh"
|
||||
#icon.font="SF Pro:Bold:20.0"
|
||||
icon.font="0xProto Nerd Font Mono:Bold:20.0"
|
||||
icon.color=$GREEN
|
||||
icon.padding_left=4
|
||||
icon.padding_right=4
|
||||
label.font="0xProto Nerd Font Mono:Bold:15.0"
|
||||
label.color=$WHITE
|
||||
label.padding_left=4
|
||||
label.padding_right=8
|
||||
background.color=$BACKGROUND_2
|
||||
background.corner_radius=8
|
||||
background.height=28
|
||||
background.drawing=on
|
||||
padding_left=4
|
||||
padding_right=4
|
||||
update_freq=120
|
||||
)
|
||||
|
||||
sketchybar --add item battery right \
|
||||
--set battery "${battery[@]}" \
|
||||
--subscribe battery system_woke power_source_change
|
||||
11
.config/sketchybar/items/clock.sh
Executable file
11
.config/sketchybar/items/clock.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
sketchybar --add item clock right \
|
||||
--set clock update_freq=10 \
|
||||
--set clock icon= \
|
||||
--set clock icon.color=$ICON_COLOR \
|
||||
--set clock label.color=$LABEL_COLOR \
|
||||
--set clock script="$PLUGIN_DIR/clock.sh" \
|
||||
--set clock click_script="$PLUGIN_DIR/zen.sh"
|
||||
46
.config/sketchybar/items/menu_items.sh
Executable file
46
.config/sketchybar/items/menu_items.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
# Control Center style menu items
|
||||
# These will be positioned to the right of the workspaces
|
||||
|
||||
# Bluetooth
|
||||
bluetooth=(
|
||||
script="$PLUGIN_DIR/bluetooth.sh"
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:18.0"
|
||||
icon.color=0xffffffff
|
||||
label.drawing=off
|
||||
update_freq=10
|
||||
click_script="open 'x-apple.systempreferences:com.apple.BluetoothSettings'"
|
||||
)
|
||||
|
||||
# AirDrop
|
||||
airdrop=(
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:18.0"
|
||||
icon.color=0xffffffff
|
||||
label.drawing=off
|
||||
click_script="open 'x-apple.systempreferences:com.apple.AirDrop-Handoff-Settings'"
|
||||
)
|
||||
|
||||
# Focus/Do Not Disturb
|
||||
focus=(
|
||||
script="$PLUGIN_DIR/focus.sh"
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:18.0"
|
||||
icon.color=0xffffffff
|
||||
label.drawing=off
|
||||
update_freq=30
|
||||
click_script="shortcuts run 'Toggle Focus'"
|
||||
)
|
||||
|
||||
sketchybar --add item bluetooth right \
|
||||
--set bluetooth "${bluetooth[@]}" \
|
||||
\
|
||||
--add item airdrop right \
|
||||
--set airdrop "${airdrop[@]}" \
|
||||
\
|
||||
--add item focus right \
|
||||
--set focus "${focus[@]}"
|
||||
24
.config/sketchybar/items/mic.old
Executable file
24
.config/sketchybar/items/mic.old
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
mic=(
|
||||
script="$PLUGIN_DIR/mic/mic.sh"
|
||||
click_script="$PLUGIN_DIR/mic/mic_click.sh"
|
||||
icon.color=0xffffffff
|
||||
icon.padding_right=4
|
||||
icon.padding_left=4
|
||||
label.padding_right=4
|
||||
label.padding_left=4
|
||||
background.color=$BACKGROUND_2
|
||||
background.corner_radius=8
|
||||
background.height=28
|
||||
background.drawing=on
|
||||
icon.font="0xProto Nerd Font Mono:Bold:30.0"
|
||||
label.color=0xffffffff
|
||||
label.font="0xProto Nerd Font Mono:Bold:15.0"
|
||||
)
|
||||
|
||||
sketchybar --add item mic right \
|
||||
--set mic "${mic[@]}" \
|
||||
--subscribe mic volume_change
|
||||
219
.config/sketchybar/items/mic.sh
Executable file
219
.config/sketchybar/items/mic.sh
Executable file
|
|
@ -0,0 +1,219 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
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=right
|
||||
popup.height=150
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:20.0"
|
||||
icon.color=$GREEN
|
||||
icon.padding_left=8
|
||||
icon.padding_right=8
|
||||
label.drawing=off
|
||||
drawing=on
|
||||
background.color=$BACKGROUND_2
|
||||
background.corner_radius=8
|
||||
background.height=28
|
||||
background.drawing=on
|
||||
padding_left=4
|
||||
padding_right=4
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
spotify_title=(
|
||||
icon.drawing=off
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
width=0
|
||||
label.font="SF Pro:Heavy:15.0"
|
||||
label.color=$WHITE
|
||||
y_offset=55
|
||||
)
|
||||
|
||||
spotify_artist=(
|
||||
icon.drawing=off
|
||||
y_offset=30
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
width=0
|
||||
label.color=$GREY
|
||||
)
|
||||
|
||||
spotify_album=(
|
||||
icon.drawing=off
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
y_offset=15
|
||||
width=0
|
||||
label.color=$GREY
|
||||
)
|
||||
|
||||
spotify_state=(
|
||||
icon.drawing=on
|
||||
icon.font="SF Pro:Light Italic:10.0"
|
||||
icon.width=45
|
||||
icon="00:00"
|
||||
icon.color=$GREY
|
||||
label.drawing=on
|
||||
label.font="SF Pro:Light Italic:10.0"
|
||||
label.width=45
|
||||
label="00:00"
|
||||
label.color=$GREY
|
||||
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=$SPOTIFY_SHUFFLE
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
icon.highlight_color=$GREY
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_back=(
|
||||
icon=$SPOTIFY_BACK
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
label.drawing=off
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_play=(
|
||||
icon=
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
background.height=40
|
||||
background.corner_radius=20
|
||||
width=40
|
||||
align=center
|
||||
background.color=$BACKGROUND_1
|
||||
background.border_color=0xffffffff
|
||||
background.border_width=0
|
||||
background.drawing=on
|
||||
icon.padding_left=4
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
updates=on
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_next=(
|
||||
icon=$SPOTIFY_NEXT
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_repeat=(
|
||||
icon=$SPOTIFY_REPEAT
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.highlight_color=$GREY
|
||||
icon.padding_left=5
|
||||
icon.padding_right=10
|
||||
icon.color=0xff000000
|
||||
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 right \
|
||||
--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[@]}"
|
||||
25
.config/sketchybar/items/recording.sh
Executable file
25
.config/sketchybar/items/recording.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
recording=(
|
||||
script="$PLUGIN_DIR/recording.sh"
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:14.0"
|
||||
icon.color=$RED
|
||||
icon.padding_left=8
|
||||
icon.padding_right=8
|
||||
label.drawing=off
|
||||
drawing=off
|
||||
background.color=$BACKGROUND_2
|
||||
background.corner_radius=8
|
||||
background.height=28
|
||||
background.drawing=off
|
||||
padding_left=4
|
||||
padding_right=4
|
||||
update_freq=2
|
||||
click_script="$PLUGIN_DIR/recording_click.sh"
|
||||
)
|
||||
|
||||
sketchybar --add item recording right \
|
||||
--set recording "${recording[@]}"
|
||||
15
.config/sketchybar/items/simple_calendar.sh
Executable file
15
.config/sketchybar/items/simple_calendar.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
# Simple calendar item for far right
|
||||
simple_calendar=(
|
||||
icon="📅"
|
||||
icon.font="0xProto Nerd Font Mono:Bold:14.0"
|
||||
icon.color=0xffffffff
|
||||
label.drawing=off
|
||||
click_script="open -a Calendar"
|
||||
)
|
||||
|
||||
sketchybar --add item simple_calendar right \
|
||||
--set simple_calendar "${simple_calendar[@]}"
|
||||
219
.config/sketchybar/items/spotify.sh
Executable file
219
.config/sketchybar/items/spotify.sh
Executable file
|
|
@ -0,0 +1,219 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
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=right
|
||||
popup.height=150
|
||||
icon=""
|
||||
icon.font="0xProto Nerd Font Mono:Bold:20.0"
|
||||
icon.color=$GREEN
|
||||
icon.padding_left=8
|
||||
icon.padding_right=8
|
||||
label.drawing=off
|
||||
drawing=on
|
||||
background.color=$BACKGROUND_2
|
||||
background.corner_radius=8
|
||||
background.height=28
|
||||
background.drawing=on
|
||||
padding_left=4
|
||||
padding_right=4
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
spotify_title=(
|
||||
icon.drawing=off
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
width=0
|
||||
label.font="SF Pro:Heavy:15.0"
|
||||
label.color=$WHITE
|
||||
y_offset=55
|
||||
)
|
||||
|
||||
spotify_artist=(
|
||||
icon.drawing=off
|
||||
y_offset=30
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
width=0
|
||||
label.color=$GREY
|
||||
)
|
||||
|
||||
spotify_album=(
|
||||
icon.drawing=off
|
||||
padding_left=0
|
||||
padding_right=0
|
||||
y_offset=15
|
||||
width=0
|
||||
label.color=$GREY
|
||||
)
|
||||
|
||||
spotify_state=(
|
||||
icon.drawing=on
|
||||
icon.font="SF Pro:Light Italic:10.0"
|
||||
icon.width=45
|
||||
icon="00:00"
|
||||
icon.color=$GREY
|
||||
label.drawing=on
|
||||
label.font="SF Pro:Light Italic:10.0"
|
||||
label.width=45
|
||||
label="00:00"
|
||||
label.color=$GREY
|
||||
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=$SPOTIFY_SHUFFLE
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
icon.highlight_color=$GREY
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_back=(
|
||||
icon=$SPOTIFY_BACK
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
label.drawing=off
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_play=(
|
||||
icon=
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
background.height=40
|
||||
background.corner_radius=20
|
||||
width=40
|
||||
align=center
|
||||
background.color=$BACKGROUND_1
|
||||
background.border_color=0xffffffff
|
||||
background.border_width=0
|
||||
background.drawing=on
|
||||
icon.padding_left=4
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
updates=on
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_next=(
|
||||
icon=$SPOTIFY_NEXT
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.padding_left=5
|
||||
icon.padding_right=5
|
||||
icon.color=0xff000000
|
||||
label.drawing=off
|
||||
script="$PLUGIN_DIR/spotify.sh"
|
||||
y_offset=-45
|
||||
)
|
||||
|
||||
spotify_repeat=(
|
||||
icon=$SPOTIFY_REPEAT
|
||||
icon.font="SF Pro:Regular:14.0"
|
||||
icon.highlight_color=$GREY
|
||||
icon.padding_left=5
|
||||
icon.padding_right=10
|
||||
icon.color=0xff000000
|
||||
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 right \
|
||||
--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[@]}"
|
||||
18
.config/sketchybar/items/volume.sh.old
Executable file
18
.config/sketchybar/items/volume.sh.old
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
volume=(
|
||||
script="$PLUGIN_DIR/volume.sh"
|
||||
icon.color=0xffffffff
|
||||
icon.font="0xProto Nerd Font Mono:Bold:18.0"
|
||||
label.color=0xffffffff
|
||||
label.font="0xProto Nerd Font Mono:Bold:15.0"
|
||||
click_script="open -a 'Audio MIDI Setup'"
|
||||
scroll_script="$PLUGIN_DIR/volume_scroll.sh"
|
||||
)
|
||||
|
||||
sketchybar --add item volume right \
|
||||
--set volume "${volume[@]}" \
|
||||
--subscribe volume volume_change mouse.scrolled
|
||||
17
.config/sketchybar/items/wifi.sh
Executable file
17
.config/sketchybar/items/wifi.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
source "$CONFIG_DIR/icons.sh"
|
||||
|
||||
wifi=(
|
||||
script="$PLUGIN_DIR/wifi.sh"
|
||||
icon.color=0xffffffff
|
||||
icon.font="0xProto Nerd Font Mono:Bold:18.0"
|
||||
label.color=0xffffffff
|
||||
label.font="0xProto Nerd Font Mono:Bold:15.0"
|
||||
click_script="open 'x-apple.systempreferences:com.apple.Network-Settings.extension'"
|
||||
update_freq=10
|
||||
)
|
||||
|
||||
sketchybar --add item wifi right \
|
||||
--set wifi "${wifi[@]}"
|
||||
Loading…
Reference in a new issue