From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/waybar/module-calendar.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to '.config/waybar/module-calendar.sh') 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" } -- cgit 1.4.1