summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar/plugins/nextevent.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/plugins/nextevent.sh
parent6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff)
updates
Diffstat (limited to 'mac/.config/sketchybar/plugins/nextevent.sh')
-rw-r--r--mac/.config/sketchybar/plugins/nextevent.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/mac/.config/sketchybar/plugins/nextevent.sh b/mac/.config/sketchybar/plugins/nextevent.sh
deleted file mode 100644
index 732629a..0000000
--- a/mac/.config/sketchybar/plugins/nextevent.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-
-render_item() {
- sketchybar --set $NAME label="$(date "+%I:%M %p")"
-}
-
-render_popup() {
-
- if which "icalBuddy" &>/dev/null; then
- input=$(/opt/homebrew/bin/icalBuddy -ec 'Found in Natural Language,CCSF' -npn -nc -iep 'datetime,title' -po 'datetime,title' -eed -ea -n -li 4 -ps '|: |' -b '' eventsToday)
- currentTime=$(date '+%I:%M %p')
-
- # echo "Debug: $NAME #11 $input"
-
- if [ -n "$input" ]; then
- IFS='^' read -ra events <<< "$input"
- for anEvent in "${events[@]}"; do
- IFS='^' read -ra eventItems <<< "$anEvent"
- eventTime=${eventItems[0]}
- if [ "$eventTime" '>' "$currentTime" ]; then
- theEvent="$anEvent"
- break
- fi
- done
- else
- theEvent="No events today"
- fi
- else
- theEvent="Please install icalBuddy → brew install ical-buddy."
- fi
-
-
- sketchybar --set clock.details label="$theEvent" click_script="sketchybar --set $NAME popup.drawing=off" >/dev/null
-}
-
-update() {
- render_item
-}
-
-popup() {
- render_popup
- sketchybar --set "$NAME" popup.drawing="$1"
-}
-
-case "$SENDER" in
-"routine" | "forced")
- update
- ;;
-"mouse.entered")
- popup on
- ;;
-"mouse.exited" | "mouse.exited.global")
- popup off
- ;;
-esac \ No newline at end of file