diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
| commit | 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch) | |
| tree | a6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar.mon/items | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/sketchybar.mon/items')
29 files changed, 964 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.mon/items/apple.sh b/mac/.config/sketchybar.mon/items/apple.sh new file mode 100755 index 0000000..5f4e9dc --- /dev/null +++ b/mac/.config/sketchybar.mon/items/apple.sh @@ -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=$BLUE + padding_right=-2 + 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[@]}" diff --git a/mac/.config/sketchybar.mon/items/battery.sh b/mac/.config/sketchybar.mon/items/battery.sh new file mode 100755 index 0000000..758547b --- /dev/null +++ b/mac/.config/sketchybar.mon/items/battery.sh @@ -0,0 +1,23 @@ +#!/bin/env/bash + +battery=( + "${menu_defaults[@]}" + icon.font.size=16 + icon.font.style="Light" + label.drawing=off + update_freq=60 + popup.align=right + click_script="sketchybar --set battery popup.drawing=toggle" + script="$PLUGIN_DIR/battery.sh" + updates=when_shown +) + +sketchybar \ + --add item battery right \ + --set battery "${battery[@]}" \ + --subscribe battery power_source_change \ + mouse.entered \ + mouse.exited \ + mouse.exited.global \ + --add item battery.details popup.battery \ + --set battery.details "${menu_item_defaults[@]}" icon.drawing=off label.padding_left=0 diff --git a/mac/.config/sketchybar.mon/items/brew.sh b/mac/.config/sketchybar.mon/items/brew.sh new file mode 100755 index 0000000..4e58efd --- /dev/null +++ b/mac/.config/sketchybar.mon/items/brew.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Trigger the brew_udpate event when brew update or upgrade is run from cmdline +# e.g. via function in .zshrc or fish function + +POPUP_CLICK_SCRIPT="sketchybar --set $NAME popup.drawing=toggle" + +brew=( + script="$PLUGIN_DIR/brew.sh" + click_script="$POPUP_CLICK_SCRIPT" + icon= + label=? + update_freq=30 + popup.align=right + popup.height=20 + icon.padding_right=-1 + padding_left=0 + padding_right=-1 + y_offset=1 +) + +brew_details=( + background.corner_radius=12 + background.padding_left=5 + background.padding_right=10 + click_script="sketchybar --set brew popup.drawing=off" +) + +sketchybar --add event brew_update \ + --add item brew right \ + --set brew "${brew[@]}" \ + \ + --subscribe brew brew_update \ + mouse.entered \ + mouse.exited \ + mouse.exited.global \ + \ + --add item brew.details popup.brew \ + --set brew.details "${brew_details[@]}" diff --git a/mac/.config/sketchybar.mon/items/cpu.sh b/mac/.config/sketchybar.mon/items/cpu.sh new file mode 100755 index 0000000..2a61f2f --- /dev/null +++ b/mac/.config/sketchybar.mon/items/cpu.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# cpu_top=( +# label.font="$FONT:Semibold:7" +# label=CPU +# icon.drawing=off +# width=0 +# padding_right=10 +# y_offset=6 +# ) +# +# cpu_percent=( +# label.font="$FONT:Heavy:12" +# label=CPU +# y_offset=-4 +# padding_right=10 +# 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 +# y_offset=3 +# ) +# +# cpu_user=( +# graph.color=$BLUE +# label.drawing=off +# icon.drawing=off +# background.height=30 +# background.drawing=on +# background.color=$TRANSPARENT +# background.padding_left=10 +# y_offset=3 +# ) +# +# 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[@]}" + +source "$HOME/.config/sketchybar/colors.sh" + +cpu_percent=( + label.font="$FONT:Heavy:12" + label=CPU% + label.color="$TEXT" + icon="$CPU" + icon.font.size=16 + icon.color="$BLUE" + icon.padding_right=-2 + padding_right=-2 + update_freq=2 + mach_helper="$HELPER" +) + +sketchybar --add item cpu.percent right \ + --set cpu.percent "${cpu_percent[@]}" diff --git a/mac/.config/sketchybar.mon/items/datetime.sh b/mac/.config/sketchybar.mon/items/datetime.sh new file mode 100755 index 0000000..4160a37 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/datetime.sh @@ -0,0 +1,37 @@ +#!/bin/env/bash + +sketchybar \ + --add item date right \ + --set date update_freq=60 \ + label.font="$FONT:Semibold:10" \ + align=right \ + icon.drawing=off \ + label.padding_right=4 \ + \ + width=0 \ + script='sketchybar --set $NAME label="$(date "+%a, %b %d")"' \ + click_script="open -a Calendar.app" \ + --subscribe date system_woke \ + mouse.entered \ + mouse.exited \ + mouse.exited.global \ + --add item date.details popup.date \ + --set date.details "${menu_item_defaults[@]}" \ + --add item clock right \ + --set clock update_freq=10 \ + \ + icon.drawing=off \ + label.font="$FONT:Bold:11" \ + align=right \ + label.padding_right=4 \ + popup.align=right \ + "${menu_defaults[@]}" \ + script="$PLUGIN_DIR/nextevent.sh" \ + click_script="sketchybar --set clock popup.drawing=toggle; open -a Calendar.app" \ + --subscribe clock system_woke \ + mouse.entered \ + mouse.exited \ + mouse.exited.global \ + --add item clock.details popup.clock \ + --set clock.details "${menu_item_defaults[@]}" icon.drawing=off label.padding_left=0 # y_offset=3 \ +# y_offset=-6 \ diff --git a/mac/.config/sketchybar.mon/items/disk.sh b/mac/.config/sketchybar.mon/items/disk.sh new file mode 100755 index 0000000..399427f --- /dev/null +++ b/mac/.config/sketchybar.mon/items/disk.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +source "$CONFIG_DIR/colors.sh" # Loads all defined colors +source "$CONFIG_DIR/icons.sh" # Loads all defined icons + +disk=( + label.font="$FONT:Heavy:12" + label.color="$TEXT" + icon="$DISK" + icon.font="$FONT:Bold:18.0" + icon.padding_right=-2 + icon.color="$MAROON" + update_freq=60 + script="$PLUGIN_DIR/disk.sh" +) + +sketchybar --add item disk right \ + --set disk "${disk[@]}" diff --git a/mac/.config/sketchybar.mon/items/dnd.sh b/mac/.config/sketchybar.mon/items/dnd.sh new file mode 100755 index 0000000..84eaf8c --- /dev/null +++ b/mac/.config/sketchybar.mon/items/dnd.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +sketchybar \ + --add item dnd right \ + --set dnd script="$PLUGIN_DIR/dnd.sh" \ + label.drawing=off \ + --add event focus_on "_NSDoNotDisturbEnabledNotification" \ + --add event focus_off "_NSDoNotDisturbDisabledNotification" \ + --subscribe dnd focus_on focus_off mouse.clicked diff --git a/mac/.config/sketchybar.mon/items/front_app.sh b/mac/.config/sketchybar.mon/items/front_app.sh new file mode 100755 index 0000000..5839243 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/front_app.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +front_app=( + label.font="$FONT:Black: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 diff --git a/mac/.config/sketchybar.mon/items/github.sh b/mac/.config/sketchybar.mon/items/github.sh new file mode 100755 index 0000000..1a27fd5 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/github.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +POPUP_CLICK_SCRIPT="sketchybar --set \$NAME popup.drawing=toggle" + +github_bell=( + padding_right=-5 + update_freq=180 + icon=$BELL + icon.font="$FONT:Bold:15.0" + icon.color=$BLUE + label=$LOADING + label.highlight_color=$BLUE + popup.align=right + script="$PLUGIN_DIR/github.sh" + click_script="$POPUP_CLICK_SCRIPT" +) + +github_template=( + drawing=off + background.corner_radius=12 + padding_left=7 + padding_right=7 + icon.background.height=2 + icon.background.y_offset=-12 +) + +sketchybar --add event github.update \ + --add item github.bell right \ + --set github.bell "${github_bell[@]}" \ + --subscribe github.bell mouse.entered \ + mouse.exited \ + mouse.exited.global \ + system_woke \ + github.update \ + \ + --add item github.template popup.github.bell \ + --set github.template "${github_template[@]}" diff --git a/mac/.config/sketchybar.mon/items/kakaotalk.sh b/mac/.config/sketchybar.mon/items/kakaotalk.sh new file mode 100755 index 0000000..e5c5cf5 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/kakaotalk.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +kakaotalk=( + "${notification_defaults[@]}" + icon= + icon.font.size=13 + background.color=$YELLOW + script="$PLUGIN_DIR/kakaotalk.sh" + click_script="open -a /System/Applications/KakaoTalk.app" + icon.padding_left=7 + icon.padding_right=2 + label.padding_right=7 + background.padding_right=5 + background.height=20 +) + +sketchybar --add item kakaotalk right \ + --set kakaotalk "${kakaotalk[@]}" diff --git a/mac/.config/sketchybar.mon/items/keyboard.sh b/mac/.config/sketchybar.mon/items/keyboard.sh new file mode 100755 index 0000000..bffaf52 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/keyboard.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +keyboard=( + padding_right=4 + icon.drawing=off + script="$PLUGIN_DIR/keyboard.sh" + icon.color=$GREY + icon.font="$FONT:Regular:14.0" +) + +sketchybar --add item keyboard right \ + --set keyboard "${keyboard[@]}" \ + --add event keyboard_change "AppleSelectedInputSourcesChangedNotification" \ + --subscribe keyboard keyboard_change diff --git a/mac/.config/sketchybar.mon/items/mail.sh b/mac/.config/sketchybar.mon/items/mail.sh new file mode 100755 index 0000000..590d52b --- /dev/null +++ b/mac/.config/sketchybar.mon/items/mail.sh @@ -0,0 +1,19 @@ +#!/bin/env/bash + +# Load global styles, colors and icons +source "$CONFIG_DIR/globalstyles.sh" + +mail=( + "${notification_defaults[@]}" + icon= + icon.y_offset=1 + background.color=$YELLOW + background.height=18 + icon.padding_left=6 + label.padding_right=6 + script="$PLUGIN_DIR/mail.sh" + click_script="open -a /System/Applications/Mail.app" +) + +sketchybar --add item mail right \ + --set mail "${mail[@]}" diff --git a/mac/.config/sketchybar.mon/items/memory.sh b/mac/.config/sketchybar.mon/items/memory.sh new file mode 100755 index 0000000..5ff38ca --- /dev/null +++ b/mac/.config/sketchybar.mon/items/memory.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source "$CONFIG_DIR/colors.sh" # Loads all defined colors +source "$CONFIG_DIR/icons.sh" # Loads all defined icons + +memory=( + label.font="$FONT:Heavy:12" + label.color="$TEXT" + icon="$MEMORY" + icon.font="$FONT:Bold:16.0" + icon.font.size=20 + icon.color="$GREEN" + update_freq=15 + script="$PLUGIN_DIR/memory.sh" + icon.padding_right=-2 + padding_right=-2 +) + +sketchybar --add item memory right \ + --set memory "${memory[@]}" diff --git a/mac/.config/sketchybar.mon/items/messages.sh b/mac/.config/sketchybar.mon/items/messages.sh new file mode 100755 index 0000000..9ad9513 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/messages.sh @@ -0,0 +1,13 @@ +# Load global styles, colors and icons +source "$CONFIG_DIR/globalstyles.sh" + +messages=( + "${notification_defaults[@]}" + icon= + background.color=$GREEN + script="$PLUGIN_DIR/messages.sh" + click_script="open -a /System/Applications/Messages.app" +) + +sketchybar --add item messages right \ + --set messages "${messages[@]}"
\ No newline at end of file diff --git a/mac/.config/sketchybar.mon/items/mic.sh b/mac/.config/sketchybar.mon/items/mic.sh new file mode 100755 index 0000000..666af0e --- /dev/null +++ b/mac/.config/sketchybar.mon/items/mic.sh @@ -0,0 +1,5 @@ +sketchybar -m --add item mic right \ + --set mic update_freq=3 \ + --set mic script="$PLUGIN_DIR/mic.sh" \ + --set mic click_script="$PLUGIN_DIR/mic_click.sh" \ + padding_right=-8 diff --git a/mac/.config/sketchybar.mon/items/music.sh b/mac/.config/sketchybar.mon/items/music.sh new file mode 100755 index 0000000..3730d88 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/music.sh @@ -0,0 +1,36 @@ +#!/bin/env/bash + +# Load global styles, colors and icons +source "$CONFIG_DIR/globalstyles.sh" + +music=( + "${bracket_defaults[@]}" + script="$PLUGIN_DIR/music.sh" + popup.align=center + padding_left=0 + label.padding_right=$PADDINGS + padding_right=$(($PADDINGS * 2)) + icon= + drawing=off + label="Loading…" + background.image=media.artwork + background.image.scale=0.75 + background.image.corner_radius=$PADDINGS + icon.padding_left=48 + label.max_chars=33 + updates=on + --subscribe music media_change + --subscribe music mouse.entered + mouse.clicked + mouse.exited + mouse.exited.global +) + +sketchybar \ + --add item music center \ + --set music "${music[@]}" \ + --set music "${menu_defaults[@]}" \ + --add item music.cover popup.music \ + --add item music.artist popup.music \ + --add item music.title popup.music \ + --add item music.album popup.music diff --git a/mac/.config/sketchybar.mon/items/network.sh b/mac/.config/sketchybar.mon/items/network.sh new file mode 100755 index 0000000..93bf083 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/network.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +source "$CONFIG_DIR/globalstyles.sh" + +network_down=( + y_offset=-9 + label.font="$FONT:Heavy:10" + label.color="$TEXT" + icon="$NETWORK_DOWN" + icon.font="$NERD_FONT:Bold:16.0" + icon.font.size=15 + icon.color="$GREEN" + icon.highlight_color="$BLUE" + icon.padding_right=2 + padding_right=-2 + update_freq=1 + icon.y_offset=1 +) + +network_up=( + background.padding_right=-65 + y_offset=5 + label.font="$FONT:Heavy:10" + label.color="$TEXT" + label.padding_right=5 + icon="$NETWORK_UP" + icon.font="$NERD_FONT:Bold:16.0" + icon.font.size=15 + icon.color="$GREEN" + icon.highlight_color="$BLUE" + icon.padding_right=2 + icon.y_offset=1 + update_freq=1 + script="$PLUGIN_DIR/network.sh" +) + +sketchybar --add item network.down right \ + --set network.down "${network_down[@]}" \ + --add item network.up right \ + --set network.up "${network_up[@]}" diff --git a/mac/.config/sketchybar.mon/items/package_monitor.sh b/mac/.config/sketchybar.mon/items/package_monitor.sh new file mode 100755 index 0000000..89be3a2 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/package_monitor.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Trigger the package_monitor_udpate event when package_monitor update or upgrade is run from cmdline +# e.g. via function in .zshrc + +package_monitor=( + icon= + icon.font.size=12 + icon.padding_right=-1 + label=? + script="$PLUGIN_DIR/package_monitor.sh" + padding_left=-2 +) + +sketchybar --add event package_monitor_update \ + --add item package_monitor right \ + --set package_monitor "${package_monitor[@]}" \ + --subscribe package_monitor package_monitor_update \ + mouse.clicked diff --git a/mac/.config/sketchybar.mon/items/separator_right.sh b/mac/.config/sketchybar.mon/items/separator_right.sh new file mode 100755 index 0000000..13a6b7f --- /dev/null +++ b/mac/.config/sketchybar.mon/items/separator_right.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +separator_right=( + icon= + icon.font="$FONT:Regular:25.0" + label.drawing=off + click_script='sketchybar --trigger toggle_stats' + icon.color="$TEXT" + padding_right=10 +) + +sketchybar --add item separator_right right \ + --set separator_right "${separator_right[@]}" diff --git a/mac/.config/sketchybar.mon/items/spaces.sh b/mac/.config/sketchybar.mon/items/spaces.sh new file mode 100755 index 0000000..5dc28d0 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/spaces.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +source "$CONFIG_DIR/globalstyles.sh" + +SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12") + +# 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=2 + icon.padding_right=-5 + label.padding_right=10 + label.font="sketchybar-app-font:Regular:16.0" + label.y_offset=-1 + background.height=2 + script="$PLUGIN_DIR/space.sh" + ) + + sketchybar --add space space.$sid left \ + --set space.$sid "${space[@]}" \ + --subscribe space.$sid mouse.clicked +done + +spaces=( + background.color=$BACKGROUND_1 + background.border_color=$BACKGROUND_2 + background.border_width=2 + background.drawing=on +) + +space_creator=( + icon= + icon.font="$FONT:Heavy:25.0" + padding_left=2 + padding_right=5 + label.drawing=off + display=active + script="$PLUGIN_DIR/space_windows.sh" + associated_display=active + click_script='yabai -m space --create && sketchybar --trigger space_change' + icon.color=$WHITE +) + +sketchybar --add bracket spaces '/space\..*/' \ + --set spaces "${spaces[@]}" \ + --add item space_creator left \ + --set space_creator "${space_creator[@]}" \ + --subscribe space_creator space_windows_change diff --git a/mac/.config/sketchybar.mon/items/spotify.sh b/mac/.config/sketchybar.mon/items/spotify.sh new file mode 100755 index 0000000..421e299 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/spotify.sh @@ -0,0 +1,201 @@ +#!/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 +) + +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[@]}" diff --git a/mac/.config/sketchybar.mon/items/svim.sh b/mac/.config/sketchybar.mon/items/svim.sh new file mode 100755 index 0000000..502343d --- /dev/null +++ b/mac/.config/sketchybar.mon/items/svim.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +svim=( + script="$PLUGIN_DIR/svim.sh" + icon=$INSERT_MODE + icon.font.size=20 + updates=on + drawing=off +) + +sketchybar --add event svim_update \ + --add item svim right \ + --set svim "${svim[@]}" \ + --subscribe svim svim_update diff --git a/mac/.config/sketchybar.mon/items/system.sh b/mac/.config/sketchybar.mon/items/system.sh new file mode 100755 index 0000000..dc74f73 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/system.sh @@ -0,0 +1,53 @@ +### mem Widget ### +sketchybar --add item mem right \ + --set mem update_freq=10 \ + icon="asdf" \ + icon.font="Font Awesome 6 Free:Solid:15.4" \ + icon.padding_right=4 \ + icon.color=0xfff5c1e6 \ + icon.y_offset=-3 \ + label.y_offset=-3 \ + label.font="$FONT:Medium:19.0" \ + label.color=0xff47455c \ + label.padding_right=8 \ + background.drawing=on \ + background.color=0xfff4f5f8 \ + script="$PLUGIN_DIR/mem.sh" + +# ### cpu Widget ### +# sketchybar --add item cpu right \ +# --set cpu update_freq=10 \ +# icon.font="Font Awesome 6 Free:Solid:15.4" \ +# icon.padding_right=4 \ +# icon.color=0xffedd6a4 \ +# icon.y_offset=-3 \ +# label.y_offset=-3 \ +# label.font="$FONT:Medium:19.0" \ +# label.color=0xff47455c \ +# label.padding_right=8 \ +# background.drawing=on \ +# background.color=0xfff4f5f8 \ +# script="$PLUGIN_DIR/cpu.sh" \ + +### ssd Widget ### +sketchybar --add item disk right \ + --set disk update_freq=10 \ + icon="asdf" \ + icon.font="Font Awesome 6 Free:Solid:15.4" \ + icon.padding_right=4 \ + icon.color=0xfff37ea0 \ + icon.y_offset=-3 \ + label.y_offset=-3 \ + label.font="$FONT:Medium:19.0" \ + label.color=0xff47455c \ + label.padding_right=8 \ + background.drawing=on \ + background.color=0xfff4f5f8 \ + script="$PLUGIN_DIR/disk.sh" + +# sketchybar --add item collapse right \ +# --set collapse icon="" \ +# icon.font="Font Awesome 6 Free:Solid:20.0" \ +# icon.color=0xff47455c \ +# icon.y_offset=-3 \ +# click_script="$PLUGIN_DIR/collapse.sh" diff --git a/mac/.config/sketchybar.mon/items/thunderbird.sh b/mac/.config/sketchybar.mon/items/thunderbird.sh new file mode 100755 index 0000000..234b038 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/thunderbird.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +thunderbird=( + "${notification_defaults[@]}" + icon= + icon.font.size=17 + icon.color=$OSBLUE + icon.y_offset=0 + background.color=$WHITE + script="$PLUGIN_DIR/thunderbird.sh" + click_script="open -a /System/Applications/Thunderbird.app" + icon.padding_left=7 + icon.padding_right=-1 + label.padding_right=7 + background.padding_right=5 + background.height=20 +) + +sketchybar --add item thunderbird right \ + --set thunderbird "${thunderbird[@]}" diff --git a/mac/.config/sketchybar.mon/items/toggle_stats.sh b/mac/.config/sketchybar.mon/items/toggle_stats.sh new file mode 100755 index 0000000..301e0e4 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/toggle_stats.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +sketchybar --add event hide_stats \ + --add event show_stats \ + --add event toggle_stats \ + \ + --add item animator right \ + --set animator drawing=off \ + updates=on \ + script="$PLUGIN_DIR/toggle_stats.sh" \ + --subscribe animator hide_stats show_stats toggle_stats diff --git a/mac/.config/sketchybar.mon/items/volume.sh b/mac/.config/sketchybar.mon/items/volume.sh new file mode 100755 index 0000000..a8efdd5 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/volume.sh @@ -0,0 +1,35 @@ +#!/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 + padding_left=-5 + padding_right=-1 +) + +volume_icon=( + click_script="$PLUGIN_DIR/volume_click.sh" + icon=$VOLUME_100 + icon.width=0 + icon.align=left + icon.font="$FONT:Regular:14.0" + label.width=25 + label.align=left + label.font="$FONT:Regular:14.0" +) + +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[@]}" diff --git a/mac/.config/sketchybar.mon/items/weather.sh b/mac/.config/sketchybar.mon/items/weather.sh new file mode 100755 index 0000000..287354d --- /dev/null +++ b/mac/.config/sketchybar.mon/items/weather.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Load global styles, colors and icons +source "$CONFIG_DIR/globalstyles.sh" + +weather=( + script="$PLUGIN_DIR/weather.sh" + "${menu_defaults[@]}" + popup.align=right + update_freq=300 + updates=on + click_script="sketchybar --set $NAME popup.drawing=toggle; open -a /System/Applications/Weather.app" + --subscribe weather wifi_change + mouse.entered + mouse.exited + mouse.exited.global +) + +sketchybar \ + --add item weather right \ + --set weather "${weather[@]}" \ + --add item weather.details popup.weather \ + --set weather.details "${menu_item_defaults[@]}" icon.drawing=off diff --git a/mac/.config/sketchybar.mon/items/wifi.sh b/mac/.config/sketchybar.mon/items/wifi.sh new file mode 100755 index 0000000..a903c23 --- /dev/null +++ b/mac/.config/sketchybar.mon/items/wifi.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +POPUP_OFF="sketchybar --set wifi popup.drawing=off" + +wifi=( + "${menu_defaults[@]}" + icon="$WIFI_DISCONNECTED" + script="$PLUGIN_DIR/wifi.sh" + label.drawing=off + click_script="$POPUP_CLICK_SCRIPT" + popup.align=right + updates=when_shown + update_freq=5 + --subscribe wifi wifi_change + mouse.entered + mouse.exited + mouse.exited.global + icon.padding_left=-3 +) + +sketchybar \ + --add item wifi right \ + --set wifi "${wifi[@]}" \ + --add item wifi.ssid popup.wifi \ + --set wifi.ssid icon= \ + label="SSID" \ + "${menu_item_defaults[@]}" \ + click_script="open 'x-apple.systempreferences:com.apple.preference.network?Wi-Fi';$POPUP_OFF" \ + --add item wifi.strength popup.wifi \ + --set wifi.strength icon= \ + label="Speed" \ + "${menu_item_defaults[@]}" \ + click_script="open 'x-apple.systempreferences:com.apple.preference.network?Wi-Fi';$POPUP_OFF" \ + --add item wifi.ipaddress popup.wifi \ + --set wifi.ipaddress icon= \ + label="IP Address" \ + "${menu_item_defaults[@]}" \ + click_script="echo \"$IP_ADDRESS\"|pbcopy;$POPUP_OFF" \ + --subscribe wifi wifi_change mouse.clicked diff --git a/mac/.config/sketchybar.mon/items/yabai.sh b/mac/.config/sketchybar.mon/items/yabai.sh new file mode 100755 index 0000000..c123a8b --- /dev/null +++ b/mac/.config/sketchybar.mon/items/yabai.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +yabai=( + icon=$YABAI_GRID + label.drawing=off + script="$PLUGIN_DIR/yabai.sh" + icon.font="$FONT:Bold:14.0" + icon.color="$FLAMINGO" + padding_left=-2 + padding_right=0 +) + +sketchybar --add event window_focus \ + --add event windows_on_spaces \ + --add item yabai left \ + --set yabai "${yabai[@]}" \ + --subscribe yabai window_focus \ + space_change \ + windows_on_spaces \ + mouse.scrolled.global \ + mouse.clicked |
