configurable start and end of day

This commit is contained in:
Ämin Baumeler 2025-06-10 13:13:43 +02:00
parent 54b10ad726
commit af5356f07b
2 changed files with 6 additions and 4 deletions

View File

@ -26,8 +26,6 @@ function hrlines(start, stop, h, starth, stoph, tmp, i) {
}
BEGIN {
FS = "|"
daystart = 8
dayend = 18
GREEN = "\033[1;32m"
RED = "\033[1;31m"
WHITE = "\033[1;97m"

View File

@ -25,6 +25,11 @@ if [ -z "${FZF_VCAL_USE_EXPORTED:-}" ]; then
export SYNC_CMD
export COLLECTION_LABELS
DAY_START=${DAY_START:-8}
DAY_END=${DAY_END:-18}
export DAY_START
export DAY_END
# Tools
if command -v "fzf" >/dev/null; then
FZF="fzf"
@ -176,7 +181,7 @@ __show_day() {
echo "$s|$e|$starttime|$endtime|$fpath|$description"
done)
fi
echo "$sef" | sort -n | awk "$AWK_DAYVIEW"
echo "$sef" | sort -n | awk -v daystart="$DAY_START" -v dayend="$DAY_END" "$AWK_DAYVIEW"
}
__list() {
@ -321,7 +326,6 @@ if [ "${1:-}" = "--preview" ]; then
fi
if [ "${1:-}" = "--day-reload" ]; then
echo "Jumping to day $DISPLAY_DATE!"
__show_day
exit
fi