blob: 8a22606b5e2ef701ee97ce1f9f93ee4cb1bf9def (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
|