config: remove default values for this-*-time-format

Having a default value is confusing because to disable the dynamic time
format, the users need to explicitly configure these settings to the
empty string.

Do not set default values for these settings when they are unset in the
configuration. Comment the default config file values to serve as
examples.

Fixes: aae29324fd ("config: fix default time format values")
Reported-by: Nicolai Dagestad <nicolai@dagestad.fr>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
This commit is contained in:
Robin Jarry 2022-09-25 10:51:22 +02:00
parent 9fdc7acf5b
commit 24e30f7f1f
3 changed files with 12 additions and 12 deletions

View File

@ -35,22 +35,22 @@ timestamp-format=2006-01-02 03:04 PM
# Index-only time format for messages that were received/sent today.
# If this is not specified, timestamp-format is used instead.
#
# Default: "03:04 PM" (12 hour time)
this-day-time-format=03:04 PM
# Default: ""
#this-day-time-format=03:04 PM
#
# Index-only time format for messages that were received/sent within the last
# 7 days. If this is not specified, timestamp-format is used instead.
#
# Default: "Monday 03:04 PM" (Week day + 12 hour time)
this-week-time-format=Monday 03:04 PM
# Default: ""
#this-week-time-format=Monday 03:04 PM
#
# Index-only time format for messages that were received/sent this year.
# If this is not specified, timestamp-format is used instead.
#
# Default: "January 02" (Month + month day)
this-year-time-format=January 02
# Default: ""
#this-year-time-format=January 02
#
# Width of the sidebar, including the border.

View File

@ -736,9 +736,9 @@ func LoadConfigFromFile(root *string, accts []string) (*AercConfig, error) {
Ui: UIConfig{
IndexFormat: "%-20.20D %-17.17n %Z %s",
TimestampFormat: "2006-01-02 03:04 PM",
ThisDayTimeFormat: "03:04 PM",
ThisWeekTimeFormat: "Monday 03:04 PM",
ThisYearTimeFormat: "January 02",
ThisDayTimeFormat: "",
ThisWeekTimeFormat: "",
ThisYearTimeFormat: "",
ShowHeaders: []string{
"From", "To", "Cc", "Bcc", "Subject", "Date",
},

View File

@ -106,20 +106,20 @@ These options are configured in the *[ui]* section of aerc.conf.
Index-only time format for messages that were received/sent today.
If this is not specified, *timestamp-format* is used instead.
Default: "03:04 PM" (12 hour time)
Default: ""
*this-week-time-format*
Index-only time format for messages that were received/sent within the
last 7 days. If this is not specified, *timestamp-format* is used
instead.
Default: "Monday 03:04 PM" (Week day + 12 hour time)
Default: ""
*this-year-time-format*
Index-only time format for messages that were received/sent this year.
If this is not specified, *timestamp-format* is used instead.
Default: "January 02" (Month + month day)
Default: ""
*sidebar-width*
Width of the sidebar, including the border. Set to zero to disable the