From 08adcd2f98623a22a80e643b3e76664de033fecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Thu, 5 Jun 2025 20:11:27 +0200 Subject: [PATCH] hook for day view --- src/main.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.sh b/src/main.sh index 391dcea..5f5c330 100755 --- a/src/main.sh +++ b/src/main.sh @@ -168,6 +168,12 @@ if [ -z "${WEEKLY_DATA_FILE:-}" ]; then export WEEKLY_DATA_FILE fi +if [ "${1:-}" = "--day" ]; then + DISPLAY_DAY="$2" + echo "Jumping to day $DISPLAY_DAY!" + exit +fi + DISPLAY_DATE="today" if [ "${1:-}" = "--date" ]; then DISPLAY_DATE="$2" @@ -178,7 +184,6 @@ DISPLAY_DATE_PREV=$(date -d "$DISPLAY_DATE -1 week" +"%D") DISPLAY_DATE_NEXT=$(date -d "$DISPLAY_DATE +1 week" +"%D") selection=$( ( - #cut -d '|' -f 3 "$APPROX_DATA_FILE" cat "$APPROX_DATA_FILE" yes " " | head -n 50 __list @@ -190,7 +195,8 @@ selection=$( ( --ellipsis='' \ --delimiter='|' \ --with-nth='{4}' \ - --accept-nth=1,2,3,5 \ + --accept-nth=1,2 \ + --no-info \ --ansi \ --no-clear \ --bind="ctrl-p:become($0 --date '$DISPLAY_DATE_PREV')" \ @@ -204,8 +210,6 @@ fi sign=$(echo "$selection" | cut -d '|' -f 1) startdate=$(echo "$selection" | cut -d '|' -f 2) -endate=$(echo "$selection" | cut -d '|' -f 3) -files=$(echo "$selection" | cut -d '|' -f 4) if [ "$sign" = "~" ]; then exec $0 --date "$startdate" else