summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
commit07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch)
treea6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh
parent6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff)
updates
Diffstat (limited to 'mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh')
-rwxr-xr-xmac/.config/sketchybar.mon/sketchybar/plugins/apple.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh b/mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh
new file mode 100755
index 0000000..8a22606
--- /dev/null
+++ b/mac/.config/sketchybar.mon/sketchybar/plugins/apple.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# Source colors for consistent theming
+source "$CONFIG_DIR/colors.sh"
+
+# Create a simple popup menu for the Apple logo
+sketchybar --set apple.logo popup.drawing=toggle
+
+# Check if popup is being shown
+if [ "$(sketchybar --query apple.logo | jq -r '.popup.drawing')" = "on" ]; then
+ # Add popup items
+ sketchybar --add item apple.prefs popup.apple.logo \
+ --set apple.prefs icon="󰒓" \
+ icon.color=$BLUE \
+ label="System Preferences" \
+ click_script="open /System/Applications/System\ Preferences.app; sketchybar --set apple.logo popup.drawing=off"
+
+ sketchybar --add item apple.activity popup.apple.logo \
+ --set apple.activity icon="󰖚" \
+ icon.color=$GREEN \
+ label="Activity Monitor" \
+ click_script="open /System/Applications/Utilities/Activity\ Monitor.app; sketchybar --set apple.logo popup.drawing=off"
+
+ sketchybar --add item apple.lock popup.apple.logo \
+ --set apple.lock icon="󰌾" \
+ icon.color=$RED \
+ label="Lock Screen" \
+ click_script="pmset displaysleepnow; sketchybar --set apple.logo popup.drawing=off"
+
+ sketchybar --add item apple.sleep popup.apple.logo \
+ --set apple.sleep icon="󰤄" \
+ icon.color=$YELLOW \
+ label="Sleep" \
+ click_script="pmset sleepnow; sketchybar --set apple.logo popup.drawing=off"
+else
+ # Remove popup items when hiding
+ sketchybar --remove apple.prefs apple.activity apple.lock apple.sleep
+fi