summary refs log tree commit diff
path: root/.config/waybar/module-calendar.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/waybar/module-calendar.sh')
-rwxr-xr-x.config/waybar/module-calendar.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/.config/waybar/module-calendar.sh b/.config/waybar/module-calendar.sh
index 6b20e2f..f779a5c 100755
--- a/.config/waybar/module-calendar.sh
+++ b/.config/waybar/module-calendar.sh
@@ -5,15 +5,14 @@ set -eu
 shopt -s extglob
 
 update() {
-	local today tn
+	local events tn
 	local text
 
 	# get events
-	today=$(~/src/calsync/ics2calendartxt ~/calendars/**/**/* 2>/dev/null |
-		grep -I "$(date -I)")
-	[ -z "$today" ] && return
+	events=$(env COLOR=never cdar 2>/dev/null)
+	[ -z "$events" ] && return
 
-	tn=$(wc -l <<<"$today")
+	tn=$(wc -l <<<"$events")
 
 	# 	text="$today"
 	# 	text="${text##"$(date +'%Y-%m-%d w%V %a ')"}"
@@ -22,7 +21,7 @@ update() {
 	text="󰃭 $tn"
 
 	jq -nrc '{text:$text,tooltip:$tip}' \
-		--arg tip "$today" \
+		--arg tip "$events" \
 		--arg text "$text"
 }