help and improvements
This commit is contained in:
parent
29f1672020
commit
e1d26fa2e1
22
src/main.sh
22
src/main.sh
@ -331,6 +331,13 @@ if [ "${1:-}" = "--help" ]; then
|
||||
echo " --goto Interactively enter date to jump to"
|
||||
echo " --day <day> Show appointments of specified day"
|
||||
echo " --date <date> Show week of specified date"
|
||||
echo ""
|
||||
echo "You may also start this program with setting locale and timezone"
|
||||
echo "information. For instance, to see and modify all of your calendar"
|
||||
echo "entries from the perspective of Saigon, run"
|
||||
echo "TZ='Asia/Saigon' $0"
|
||||
echo "Likewise, you may specify the usage of Greek with"
|
||||
echo "LC_TIME=el_GR.UTF-8 $0"
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -394,7 +401,7 @@ if [ "${1:-}" = "--day" ]; then
|
||||
--ansi \
|
||||
--no-sort \
|
||||
--no-input \
|
||||
--margin='20%' \
|
||||
--margin='20%,5%' \
|
||||
--border='double' \
|
||||
--border-label="🗓️ $(date -d "$DISPLAY_DATE" +"%A %e %B %Y")" \
|
||||
--color=label:bold:green \
|
||||
@ -409,7 +416,10 @@ if [ "${1:-}" = "--day" ]; then
|
||||
--bind='ctrl-j:down+hide-preview+transform:echo {} | grep \|\| || echo show-preview' \
|
||||
--bind='ctrl-k:up+hide-preview+transform:echo {} | grep \|\| || echo show-preview' \
|
||||
--bind="ctrl-s:execute($SYNC_CMD ; printf 'Press <enter> to continue.'; read -r tmp)" \
|
||||
--bind="ctrl-alt-d:become($0 --delete {})"
|
||||
--bind="ctrl-alt-d:become($0 --delete {})" \
|
||||
--bind="j:preview-down" \
|
||||
--bind="k:preview-down" \
|
||||
--bind="w:toggle-preview-wrap"
|
||||
)
|
||||
key=$(echo "$selection" | head -1)
|
||||
line=$(echo "$selection" | tail -1)
|
||||
@ -586,15 +596,15 @@ selection=$(
|
||||
--tac \
|
||||
--no-sort \
|
||||
--no-hscroll \
|
||||
--ellipsis='' \
|
||||
--delimiter='|' \
|
||||
--with-nth='{4}' \
|
||||
--ellipsis="" \
|
||||
--delimiter="|" \
|
||||
--with-nth="{4}" \
|
||||
--accept-nth=1,2 \
|
||||
--ansi \
|
||||
--gap 1 \
|
||||
--no-scrollbar \
|
||||
--info=right \
|
||||
--info-command='printf "Timezone: ${TZ:-as system} (now: $(date))"' \
|
||||
--info-command="printf \"$(date +"%R %Z")\"" \
|
||||
--preview-window=up,7,border-bottom \
|
||||
--preview="$0 --preview-week {}" \
|
||||
--expect="ctrl-n" \
|
||||
|
Loading…
Reference in New Issue
Block a user