new fixes
This commit is contained in:
parent
7a22f73d36
commit
6357eddbec
10
src/main.sh
10
src/main.sh
@ -422,6 +422,7 @@ if [ "${1:-}" = "--day" ]; then
|
||||
--border-label="🗓️ $(date -d "$DISPLAY_DATE" +"%A %e %B %Y")" \
|
||||
--color=label:bold:green \
|
||||
--border-label-pos=3 \
|
||||
--cycle \
|
||||
--delimiter='|' \
|
||||
--with-nth='{5}' \
|
||||
--accept-nth='1,2,3,4' \
|
||||
@ -482,16 +483,23 @@ selection=$(
|
||||
--bind="ctrl-d:become($0 --date '$DISPLAY_DATE_NEXT')" \
|
||||
--bind="ctrl-alt-u:become($0 --date '$DISPLAY_DATE_PREV_MONTH')" \
|
||||
--bind="ctrl-alt-d:become($0 --date '$DISPLAY_DATE_NEXT_MONTH')" \
|
||||
--bind="ctrl-s:execute($SYNC_CMD ; printf 'Press <enter> to continue.'; read -r tmp)" \
|
||||
--bind="ctrl-l:become($0)"
|
||||
)
|
||||
|
||||
key=$(echo "$selection" | head -1)
|
||||
line=$(echo "$selection" | tail -1)
|
||||
if [ "$line" = "$key" ]; then
|
||||
line=""
|
||||
fi
|
||||
sign=$(echo "$line" | cut -d '|' -f 1)
|
||||
startdate=$(echo "$line" | cut -d '|' -f 2)
|
||||
if [ "$key" = "ctrl-n" ]; then
|
||||
# Add new
|
||||
exec $0 --new "$startdate $DAY_START:00"
|
||||
if [ "$sign" = "~" ]; then
|
||||
startdate=""
|
||||
fi
|
||||
exec $0 --new "${startdate:-today} $DAY_START:00"
|
||||
fi
|
||||
if [ -z "$key" ] && [ -z "$line" ]; then
|
||||
rm "$WEEKLY_DATA_FILE" "$APPROX_DATA_FILE"
|
||||
|
Loading…
Reference in New Issue
Block a user