From f85e766a5a4940e6dff1b18a71dea437d0850919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Tue, 10 Jun 2025 13:26:01 +0200 Subject: [PATCH] better fzf --- src/main.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.sh b/src/main.sh index 94974e9..df1dd82 100755 --- a/src/main.sh +++ b/src/main.sh @@ -371,6 +371,7 @@ if [ "${1:-}" = "--date" ]; then fi DISPLAY_DATE=${DISPLAY_DATE:-today} DISPLAY_DATE=$(date -d "$DISPLAY_DATE" +"%D") +DISPLAY_POS=$((8 - $(date -d "$DISPLAY_DATE" +"%u"))) DISPLAY_DATE_PREV=$(date -d "$DISPLAY_DATE -1 week" +"%D") DISPLAY_DATE_NEXT=$(date -d "$DISPLAY_DATE +1 week" +"%D") @@ -390,6 +391,8 @@ selection=$( ( --no-info \ --ansi \ --no-clear \ + --no-scrollbar \ + --bind="load:pos($DISPLAY_POS)" \ --bind="ctrl-p:become($0 --date '$DISPLAY_DATE_PREV')" \ --bind="ctrl-n:become($0 --date '$DISPLAY_DATE_NEXT')" \ --bind="ctrl-l:become($0)")