diff --git a/src/main.sh b/src/main.sh index d7a51f5..eb94a45 100755 --- a/src/main.sh +++ b/src/main.sh @@ -331,6 +331,13 @@ if [ "${1:-}" = "--help" ]; then echo " --goto Interactively enter date to jump to" echo " --day Show appointments of specified day" echo " --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 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" \