summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar/plugins/clock_click.sh
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-24 14:02:11 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-24 14:02:11 +0900
commit130e628ab35de45226fb5b88f103c1938dacfc63 (patch)
tree22659cf6da6c8d03e9580c2a7b0aad04058a355f /mac/.config/sketchybar/plugins/clock_click.sh
parenta311b30a10e90e3f878937bcf722daa8e75b68c1 (diff)
modified .gnupg/gpg-agent.conf, created sketchybar/
Diffstat (limited to 'mac/.config/sketchybar/plugins/clock_click.sh')
-rwxr-xr-xmac/.config/sketchybar/plugins/clock_click.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/mac/.config/sketchybar/plugins/clock_click.sh b/mac/.config/sketchybar/plugins/clock_click.sh
new file mode 100755
index 0000000..e2419ad
--- /dev/null
+++ b/mac/.config/sketchybar/plugins/clock_click.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+# Source colors for consistent theming
+source "$CONFIG_DIR/colors.sh"
+
+# Create a popup showing calendar and date info
+sketchybar --set clock popup.drawing=toggle
+
+# Check if popup is being shown
+if [ "$(sketchybar --query clock | jq -r '.popup.drawing')" = "on" ]; then
+ # Get current date info
+ FULL_DATE=$(date "+%A, %B %d, %Y")
+ WEEK_NUMBER=$(date "+Week %V")
+ DAY_OF_YEAR=$(date "+Day %j of %Y")
+
+ # Add date information items
+ sketchybar --add item clock.full_date popup.clock \
+ --set clock.full_date icon="󰸘" \
+ icon.color=$YELLOW \
+ label="$FULL_DATE" \
+ click_script="open /System/Applications/Calendar.app; sketchybar --set clock popup.drawing=off"
+
+ sketchybar --add item clock.week popup.clock \
+ --set clock.week icon="󰸗" \
+ icon.color=$BLUE \
+ label="$WEEK_NUMBER" \
+ click_script="sketchybar --set clock popup.drawing=off"
+
+ sketchybar --add item clock.day_of_year popup.clock \
+ --set clock.day_of_year icon="󰸙" \
+ icon.color=$GREEN \
+ label="$DAY_OF_YEAR" \
+ click_script="sketchybar --set clock popup.drawing=off"
+
+ sketchybar --add item clock.calendar popup.clock \
+ --set clock.calendar icon="󰸝" \
+ icon.color=$ORANGE \
+ label="Open Calendar" \
+ click_script="open /System/Applications/Calendar.app; sketchybar --set clock popup.drawing=off"
+else
+ # Remove popup items when hiding
+ sketchybar --remove clock.full_date clock.week clock.day_of_year clock.calendar
+fi \ No newline at end of file