Compare commits

...

3 Commits

Author SHA1 Message Date
e254463b0e bug fix 2025-06-11 10:16:40 +02:00
9291137b94 improved new selector 2025-06-11 10:12:30 +02:00
ad32fcdb0f show tz in info 2025-06-11 10:09:45 +02:00
3 changed files with 9 additions and 5 deletions

View File

@ -23,7 +23,10 @@ function hrlines(start, stop, h, starth, stoph, tmp, i) {
for (i=h; i < starth + tmp; i++) for (i=h; i < starth + tmp; i++)
hrline(i) hrline(i)
tmp = substr(stop, 4, 2) == "00" ? 0 : 1 tmp = substr(stop, 4, 2) == "00" ? 0 : 1
return stoph + tmp if (stoph + tmp < daystart)
return daystart
else
return stoph + tmp
} }
BEGIN { BEGIN {
FS = "|" FS = "|"

View File

@ -11,8 +11,8 @@ BEGIN {
OFS = "|" OFS = "|"
} }
/^[0-7] 00:00 -- 00:00/ { dayline = dayline " " c(); next } /^[0-7] 00:00 -- 00:00/ { dayline = dayline " " c(); next }
/^[0-7] 00:00 -- / { dayline = dayline " <-|" $4 " " c(); next } /^[0-7] 00:00 -- / { dayline = dayline " <--" $4 " " c(); next }
/^[0-7] [0-9]{2}:[0-9]{2} -- 00:00/ { dayline = dayline " " $2 "|-> " c(); next } /^[0-7] [0-9]{2}:[0-9]{2} -- 00:00/ { dayline = dayline " " $2 "--> " c(); next }
/^[0-7] [0-9]{2}:[0-9]{2} -- [0-9]{2}:[0-9]{2}/ { dayline = dayline " " $2 " - " $4 " " c(); next } /^[0-7] [0-9]{2}:[0-9]{2} -- [0-9]{2}:[0-9]{2}/ { dayline = dayline " " $2 " - " $4 " " c(); next }
/^[0-7]$/ && dayline { print "+", startofweek " +" $0-1 " days", "", dayline; } /^[0-7]$/ && dayline { print "+", startofweek " +" $0-1 " days", "", dayline; }
/^[0-7]$/ { /^[0-7]$/ {

View File

@ -350,7 +350,7 @@ if [ "${1:-}" = "--goto" ]; then
fi fi
if [ "${1:-}" = "--new" ]; then if [ "${1:-}" = "--new" ]; then
collection=$(echo "$COLLECTION_LABELS" | tr ';' '\n' | $FZF --delimiter='=' --with-nth=2 --accept-nth=1) collection=$(echo "$COLLECTION_LABELS" | tr ';' '\n' | awk '/./ {print}' | $FZF --margin="30%" --no-info --delimiter='=' --with-nth=2 --accept-nth=1)
fpath="" fpath=""
while [ -f "$fpath" ] || [ -z "$fpath" ]; do while [ -f "$fpath" ] || [ -z "$fpath" ]; do
uuid=$($UUIDGEN) uuid=$($UUIDGEN)
@ -551,9 +551,10 @@ selection=$(
--delimiter='|' \ --delimiter='|' \
--with-nth='{4}' \ --with-nth='{4}' \
--accept-nth=1,2 \ --accept-nth=1,2 \
--no-info \
--ansi \ --ansi \
--no-scrollbar \ --no-scrollbar \
--info=right \
--info-command='printf "Timezone: ${TZ:-as system} ($(date +"%Z"))"' \
--preview-window=up,7,border-bottom \ --preview-window=up,7,border-bottom \
--preview="$0 --preview-week {}" \ --preview="$0 --preview-week {}" \
--expect="ctrl-n" \ --expect="ctrl-n" \