diff options
author | Robin Jarry <robin@jarry.cc> | 2024-02-10 00:47:04 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-02-14 23:05:06 +0100 |
commit | 2e5d9536412ddbb8d1a2bc71efe84040857b30a3 (patch) | |
tree | 1c0b1294769dd91e95497d92d88ce7e25ce43fff /config/ui.go | |
parent | df38d15b12de49e869121f02bbd69ff777f9e885 (diff) | |
download | aerc-2e5d9536412ddbb8d1a2bc71efe84040857b30a3.tar.gz |
config: change default appearance
The default styleset and ui settings are quite dull and don't make use
of the "newer" features that have been added to aerc in the past two
years.
Change the default styleset to something more colorful that renders
correctly on both dark and light backgrounds. Change the default ui
settings to get something more appealing to new users.
Save the previous default color theme to a new `monochrome` styleset.
Changelog-changed: The default `[ui]` settings and the `default`
styleset have changed extensively. A no-color theme can be restored
with the `monochrome` styleset.
Cc: Marc Coquand <marc@mccd.space>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Diffstat (limited to 'config/ui.go')
-rw-r--r-- | config/ui.go | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/config/ui.go b/config/ui.go index ba7ba967..e7e96f9f 100644 --- a/config/ui.go +++ b/config/ui.go @@ -15,23 +15,23 @@ import ( ) type UIConfig struct { - IndexColumns []*ColumnDef `ini:"index-columns" parse:"ParseIndexColumns" default:"date<20,name<17,flags>4,subject<*"` + IndexColumns []*ColumnDef `ini:"index-columns" parse:"ParseIndexColumns" default:"flags:4,name<20%,subject,date>="` ColumnSeparator string `ini:"column-separator" default:" "` DirListLeft *template.Template `ini:"dirlist-left" default:"{{.Folder}}"` - DirListRight *template.Template `ini:"dirlist-right" default:"{{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}"` + DirListRight *template.Template `ini:"dirlist-right" default:"{{if .Unread}}{{humanReadable .Unread}}{{end}}"` AutoMarkRead bool `ini:"auto-mark-read" default:"true"` - TimestampFormat string `ini:"timestamp-format" default:"2006-01-02 03:04 PM"` - ThisDayTimeFormat string `ini:"this-day-time-format"` - ThisWeekTimeFormat string `ini:"this-week-time-format"` - ThisYearTimeFormat string `ini:"this-year-time-format"` - MessageViewTimestampFormat string `ini:"message-view-timestamp-format"` + TimestampFormat string `ini:"timestamp-format" default:"2006 Jan 02"` + ThisDayTimeFormat string `ini:"this-day-time-format" default:"15:04"` + ThisWeekTimeFormat string `ini:"this-week-time-format" default:"Jan 02"` + ThisYearTimeFormat string `ini:"this-year-time-format" default:"Jan 02"` + MessageViewTimestampFormat string `ini:"message-view-timestamp-format" default:"2006 Jan 02, 15:04 GMT-0700"` MessageViewThisDayTimeFormat string `ini:"message-view-this-day-time-format"` MessageViewThisWeekTimeFormat string `ini:"message-view-this-week-time-format"` MessageViewThisYearTimeFormat string `ini:"message-view-this-year-time-format"` PinnedTabMarker string "ini:\"pinned-tab-marker\" default:\"`\"" - SidebarWidth int `ini:"sidebar-width" default:"20"` + SidebarWidth int `ini:"sidebar-width" default:"22"` EmptyMessage string `ini:"empty-message" default:"(no messages)"` EmptyDirlist string `ini:"empty-dirlist" default:"(no folders)"` EmptySubject string `ini:"empty-subject" default:"(no subject)"` @@ -72,8 +72,8 @@ type UIConfig struct { StyleSetName string `ini:"styleset-name" default:"default"` style StyleSet // customize border appearance - BorderCharVertical rune `ini:"border-char-vertical" default:" " type:"rune"` - BorderCharHorizontal rune `ini:"border-char-horizontal" default:" " type:"rune"` + BorderCharVertical rune `ini:"border-char-vertical" default:"│" type:"rune"` + BorderCharHorizontal rune `ini:"border-char-horizontal" default:"─" type:"rune"` ReverseOrder bool `ini:"reverse-msglist-order"` ReverseThreadOrder bool `ini:"reverse-thread-order"` @@ -83,7 +83,7 @@ type UIConfig struct { ThreadPrefixIndent string `ini:"thread-prefix-indent" default:" "` ThreadPrefixStem string `ini:"thread-prefix-stem" default:"│"` ThreadPrefixLimb string `ini:"thread-prefix-limb" default:""` - ThreadPrefixFolded string `ini:"thread-prefix-folded" default:""` + ThreadPrefixFolded string `ini:"thread-prefix-folded" default:"+"` ThreadPrefixUnfolded string `ini:"thread-prefix-unfolded" default:""` ThreadPrefixFirstChild string `ini:"thread-prefix-first-child" default:""` ThreadPrefixHasSiblings string `ini:"thread-prefix-has-siblings" default:"├─"` @@ -96,8 +96,8 @@ type UIConfig struct { // Tab Templates TabTitleAccount *template.Template `ini:"tab-title-account" default:"{{.Account}}"` - TabTitleComposer *template.Template `ini:"tab-title-composer" default:"{{.Subject}}"` - TabTitleViewer *template.Template `ini:"tab-title-viewer" default:"{{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}"` + TabTitleComposer *template.Template `ini:"tab-title-composer" default:"{{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}"` + TabTitleViewer *template.Template `ini:"tab-title-viewer" default:"{{.Subject}}"` // private contextualUis []*UiConfigContext @@ -228,8 +228,7 @@ func (*UIConfig) ParseIndexColumns(section *ini.Section, key *ini.Key) ([]*Colum _, _ = section.NewKey("column-flags", `{{.Flags | join ""}}`) } if !section.HasKey("column-subject") { - _, _ = section.NewKey("column-subject", - `{{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}`) + _, _ = section.NewKey("column-subject", `{{.ThreadPrefix}}{{.Subject}}`) } return ParseColumnDefs(key, section) } |