From 24e30f7f1fd4d4f35a46b613b941c83d84dea8e8 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sun, 25 Sep 2022 10:51:22 +0200 Subject: [PATCH] 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: aae29324fdf5 ("config: fix default time format values") Reported-by: Nicolai Dagestad Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- config/aerc.conf | 12 ++++++------ config/config.go | 6 +++--- doc/aerc-config.5.scd | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/aerc.conf b/config/aerc.conf index 6208f5d..316e7f3 100644 --- a/config/aerc.conf +++ b/config/aerc.conf @@ -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. diff --git a/config/config.go b/config/config.go index 61ee3b3..24a1b50 100644 --- a/config/config.go +++ b/config/config.go @@ -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", }, diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 55f82cc..d6b56fa 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -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