Hi folks,
this is a follow up on the colorize default theme fix for light
backgrounds. After thinking about it some more, I found the default
theme for the whole application really lacks color and also does not use
any of the shiny new features that were added since I took over the
maintenance.
This series is meant to make aerc more appealing to newcomers. I have
tested the default styleset both on light and dark backgrounds.
Everything should be visible (unless you specified invisible colors in
your terminal configuration).
Let me know what you think.
v4: Fixed default styleset init. It is getting late :)
Robin Jarry (4):
config: add missing settings in aerc.conf
config: change default appearance
colorize: adapt default style for light backgrounds
colorize: preserve defaults unless overridden
config/aerc.conf | 79 ++++++++++++++++++------
config/statusline.go | 2 +-
config/style.go | 128 ++++++++++++++-------------------------
config/ui.go | 24 ++++----
doc/aerc-config.5.scd | 39 +++++++-----
doc/aerc-stylesets.7.scd | 78 ++++++++++++++++--------
filters/colorize.c | 29 ++++-----
filters/test.sh | 2 +
stylesets/blue | 32 +++++-----
stylesets/default | 97 +++++++++++++++++------------
stylesets/dracula | 7 +++
stylesets/nord | 2 +
stylesets/pink | 32 +++++-----
stylesets/solarized | 3 +
14 files changed, 313 insertions(+), 241 deletions(-)
--
2.43.0
[PATCH aerc v4 1/4] config: add missing settings in aerc.conf
Some settings are supported and documented but their description and
default values are not present in the default aerc.conf file. Add them.
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
config/aerc.conf | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/config/aerc.conf b/config/aerc.conf
index ac2a6847515c..11e0cf3277dc 100644
--- a/config/aerc.conf+++ b/config/aerc.conf
@@ -130,6 +130,28 @@
#
#this-year-time-format=
+#+# If set, overrides timestamp-format for the message view.+#+#message-view-timestamp-format=++#+# If set, overrides timestamp-format in the message view for messages+# that were received/sent today.+#+#message-view-this-day-time-format=++# If set, overrides timestamp-format in the message view for messages+# that were recieved/sent within the last 7 days.+#+#message-view-this-week-time-format=++#+# If set, overrides *timestamp-format* in the message view for messages+# that were received/sent this year.+#+#message-view-this-year-time-format=+#
# Width of the sidebar, including the border.
#
@@ -169,6 +191,19 @@
# Default: {{.Account}}
#tab-title-account={{.Account}}
+#+# Template to use for Composer tab titles+#+# Default: {{.Subject}}+#tab-title-composer={{.Subject}}++#+# Template to use for Message Viewer tab titles+#+# Default: {{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}+#tab-title-viewer={{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}++# Marker to show before a pinned tab's name.
#
# Default: `
--
2.43.0
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.
Changelog-changed: The default `[ui]` settings and the `default`
styleset have changed extensively.
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
v4: Fixed default styleset init. It is getting late :)
config/aerc.conf | 56 +++++++++--------config/statusline.go | 2 +-config/style.go | 128 ++++++++++++++-------------------------config/ui.go | 24 ++++----doc/aerc-config.5.scd | 39 +++++++-----doc/aerc-stylesets.7.scd | 56 +++++++++--------stylesets/default | 67 +++++++++++---------
7 files changed, 181 insertions(+), 191 deletions(-)
diff --git a/config/aerc.conf b/config/aerc.conf
index 11e0cf3277dc..19aabca84056 100644
--- a/config/aerc.conf+++ b/config/aerc.conf
@@ -76,8 +76,8 @@
# terminal width. Fit width columns take the width of their contents. If no
# width specifier is set, '*' is used by default.
#
-# Default: date<20,name<17,flags>4,subject<*-#index-columns=date<20,name<17,flags>4,subject<*+# Default: flags:4,name<20%,subject,date>=+#index-columns=flags:4,name<20%,subject,date>=#
# Each name in index-columns must have a corresponding column-$name setting.
@@ -93,10 +93,10 @@
# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}}
#
# Default settings
-#column-date={{.DateAutoFormat .Date.Local}}-#column-name={{index (.From | names) 0}}#column-flags={{.Flags | join ""}}
-#column-subject={{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}+#column-name={{index (.From | names) 0}}+#column-subject={{.Style .ThreadPrefix "thread"}}{{.Subject}}+#column-date={{.DateAutoFormat .Date.Local}}#
# String separator inserted between columns. When the column width specifier is
@@ -109,31 +109,35 @@
#
# See time.Time#Format at https://godoc.org/time#Time.Format
#
-# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)-#timestamp-format=2006-01-02 03:04 PM+# Default: 2006 Jan 02+#timestamp-format=2006 Jan 02#
# Index-only time format for messages that were received/sent today.
-# If this is not specified, timestamp-format is used instead.+# If this is empty, timestamp-format is used instead.#
-#this-day-time-format=+# Default: 15:04+#this-day-time-format=15:04#
# 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.+# 7 days. If this is empty, timestamp-format is used instead.#
-#this-week-time-format=+# Default: Jan 02+#this-week-time-format=Jan 02#
# Index-only time format for messages that were received/sent this year.
-# If this is not specified, timestamp-format is used instead.+# If this is empty, timestamp-format is used instead.#
-#this-year-time-format=+#Default: Jan 02+#this-year-time-format=Jan 02#
-# If set, overrides timestamp-format for the message view.+# Overrides timestamp-format for the message view.#
-#message-view-timestamp-format=+# Default: 2006 Jan 02, 15:04 GMT-0700+#message-view-timestamp-format=2006 Jan 02, 15:04 GMT-0700#
# If set, overrides timestamp-format in the message view for messages
@@ -155,8 +159,8 @@
#
# Width of the sidebar, including the border.
#
-# Default: 20-#sidebar-width=20+# Default: 22+#sidebar-width=22#
# Message to display when viewing an empty folder.
@@ -194,14 +198,14 @@
#
# Template to use for Composer tab titles
#
-# Default: {{.Subject}}-#tab-title-composer={{.Subject}}+# Default: {{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}+#tab-title-composer={{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}#
# Template to use for Message Viewer tab titles
#
-# Default: {{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}-#tab-title-viewer={{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}+# Default: {{.Subject}}+#tab-title-viewer={{.Subject}}# Marker to show before a pinned tab's name.
@@ -218,8 +222,8 @@
# Template for the right side of the directory list.
# See aerc-templates(7) for all available fields and functions.
#
-# Default: {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}-#dirlist-right={{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}+# Default: {{if .Unread}}{{humanReadable .Unread}}{{end}}+#dirlist-right={{if .Unread}}{{humanReadable .Unread}}{{end}}# Delay after which the messages are actually listed when entering a directory.
# This avoids loading messages when skipping over folders and makes the UI more
@@ -403,8 +407,8 @@
# Customize the thread prefix appearance by selecting the folded thread
# indicator.
#
-# Default: ""-#thread-prefix-folded = ""+# Default: "+"+#thread-prefix-folded = "+"#
# Customize the thread prefix appearance by selecting the unfolded thread
@@ -486,7 +490,7 @@
# Default settings
#column-left=[{{.Account}}] {{.StatusInfo}}
#column-center={{.PendingKeys}}
-#column-right={{.TrayInfo}}+#column-right={{.TrayInfo}} | {{cwd}}#
# String separator inserted between columns.
diff --git a/config/statusline.go b/config/statusline.go
index 7af0d744a019..3a7ce0875794 100644
--- a/config/statusline.go+++ b/config/statusline.go
@@ -32,7 +32,7 @@ func (s *StatuslineConfig) ParseColumns(sec *ini.Section, key *ini.Key) ([]*Colu
_, _ = sec.NewKey("column-center", "{{.PendingKeys}}")
}
if !sec.HasKey("column-right") {
- _, _ = sec.NewKey("column-right", "{{.TrayInfo}}")+ _, _ = sec.NewKey("column-right", "{{.TrayInfo}} | {{cwd}}") }
return ParseColumnDefs(key, sec)
}
diff --git a/config/style.go b/config/style.go
index 8a88dcfc9e1b..bffed47da9a6 100644
--- a/config/style.go+++ b/config/style.go
@@ -283,6 +283,42 @@ type StyleSet struct {
path string
}
+const defaultStyleset string = `+*.selected.bg = 12+*.selected.fg = 15+*.selected.bold = true+statusline_*.dim = true+statusline_*.bg = 8+statusline_*.fg = 15+*warning.fg = 3+*success.fg = 2+*error.fg = 1+*error.bold = true+border.bg = 12+border.fg = 15+title.bg = 12+title.fg = 15+title.bold = true+header.fg = 4+header.bold = true+msglist_unread.bold = true+msglist_deleted.dim = true+msglist_marked.bg = 6+msglist_marked.fg = 15+msglist_pill.bg = 12+msglist_pill.fg = 15+part_mimetype.fg = 12+selector_chooser.bold = true+selector_focused.bold = true+selector_focused.bg = 12+selector_focused.fg = 15+completion_pill.bg = 12+completion_default.bg = 8+completion_default.fg = 15+[user]+thread.fg = 1+`+func NewStyleSet() StyleSet {
ss := StyleSet{
objects: make(map[StyleObject]*StyleConf),
@@ -290,89 +326,15 @@ func NewStyleSet() StyleSet {
user: make(map[string]*Style),
}
for _, so := range StyleNames {
- conf := new(StyleConf)-- switch so {- case STYLE_ERROR:- // *error.bold=true- conf.base.Bold = true- // error.fg=red- conf.base.Fg = tcell.ColorRed- case STYLE_WARNING:- // warning.fg=yellow- conf.base.Fg = tcell.ColorYellow- case STYLE_SUCCESS:- // success.fg=green- conf.base.Fg = tcell.ColorGreen- case STYLE_TITLE:- // title.reverse=true- conf.base.Reverse = true- case STYLE_HEADER:- // header.bold=true- conf.base.Bold = true- case STYLE_STATUSLINE_DEFAULT:- // statusline_default.reverse=true- conf.base.Reverse = true- case STYLE_STATUSLINE_ERROR:- // *error.bold=true- conf.base.Fg = tcell.ColorRed- // statusline_error.fg=red- conf.base.Bold = true- // statusline_error.reverse=true- conf.base.Reverse = true- case STYLE_STATUSLINE_WARNING:- // statusline_warning.fg=yellow- conf.base.Fg = tcell.ColorYellow- // statusline_warning.reverse=true- conf.base.Reverse = true- case STYLE_STATUSLINE_SUCCESS:- conf.base.Fg = tcell.ColorGreen- conf.base.Reverse = true- case STYLE_MSGLIST_UNREAD:- // msglist_unread.bold=true- conf.base.Bold = true- case STYLE_MSGLIST_DELETED:- // msglist_deleted.fg=gray- conf.base.Fg = tcell.ColorGray- case STYLE_MSGLIST_RESULT:- // msglist_result.fg=green- conf.base.Fg = tcell.ColorGreen- case STYLE_MSGLIST_PILL:- // msglist_pill.reverse=true- conf.base.Reverse = true- case STYLE_PART_MIMETYPE:- // part_mimetype.dim=true- conf.base.Dim = true- case STYLE_COMPLETION_PILL:- // completion_pill.reverse=true- conf.base.Reverse = true- case STYLE_TAB:- // tab.reverse=true- conf.base.Reverse = true- case STYLE_BORDER:- // border.reverse = true- conf.base.Reverse = true- case STYLE_SELECTOR_FOCUSED:- // selector_focused.reverse=true- conf.base.Reverse = true- case STYLE_SELECTOR_CHOOSER:- // selector_chooser.bold=true- conf.base.Bold = true- }-- ss.objects[so] = conf- selected := *conf- // *.selected.reverse=toggle- selected.base.Reverse = !conf.base.Reverse- switch so {- case STYLE_PART_MIMETYPE:- // part_mimetype.selected.dim=false- selected.base.Dim = false- case STYLE_PART_FILENAME:- // part_filename.selected.bold=true- selected.base.Bold = true- }- ss.selected[so] = &selected+ ss.objects[so] = new(StyleConf)+ ss.selected[so] = new(StyleConf)+ }+ f, err := ini.Load([]byte(defaultStyleset))+ if err == nil {+ err = ss.ParseStyleSet(f)+ }+ if err != nil {+ panic(err) }
return ss
}
diff --git a/config/ui.go b/config/ui.go
index 9a97d4efe55a..75b5d3e379d2 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)"`
@@ -82,7 +82,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:"├─"`
@@ -95,8 +95,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,7 +228,7 @@ func (*UIConfig) ParseIndexColumns(section *ini.Section, key *ini.Key) ([]*Colum
}
if !section.HasKey("column-subject") {
_, _ = section.NewKey("column-subject",
- `{{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}`)+ `{{.Style .ThreadPrefix "thread"}}{{.Subject}}`) }
return ParseColumnDefs(key, section)
}
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index 9ba7a94141f4..b4abcbaa0555 100644
--- a/doc/aerc-config.5.scd+++ b/doc/aerc-config.5.scd
@@ -108,7 +108,7 @@ These options are configured in the *[ui]* section of _aerc.conf_.
columns take the width of their contents. If no width specifier is set,
_\*_ is used by default.
- Default: _date<20,name<17,flags>4,subject<\*_+ Default: _flags:4,name<20%,subject,date>=_*column-separator* = _"<separator>"_
String separator inserted between columns. When a column width specifier
@@ -125,10 +125,10 @@ These options are configured in the *[ui]* section of _aerc.conf_.
By default, these columns are defined:
```
- column-date = {{.DateAutoFormat .Date.Local}}- column-name = {{index (.From | names) 0}} column-flags = {{.Flags | join ""}}
- column-subject = {{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}+ column-name = {{index (.From | names) 0}}+ column-subject = {{.ThreadPrefix}}{{.Subject}}+ column-date = {{.DateAutoFormat .Date.Local}} ```
See *aerc-templates*(7) for all available symbols and functions.
@@ -136,24 +136,31 @@ These options are configured in the *[ui]* section of _aerc.conf_.
*timestamp-format* = _<timeformat>_
See time.Time#Format at https://godoc.org/time#Time.Format
- Default: _2006-01-02 03:04 PM_ (ISO 8601 + 12 hour time)+ Default: _2006 Jan 02_*this-day-time-format* = _<timeformat>_
Index-only time format for messages that were received/sent today.
- If this is not specified, *timestamp-format* is used instead.+ If this is empty, *timestamp-format* is used instead.++ Default: _15:04_*this-week-time-format* = _<timeformat>_
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.+ last 7 days. If this is empty, *timestamp-format* is used instead.++ Default: _Jan 02_*this-year-time-format* = _<timeformat>_
Index-only time format for messages that were received/sent this year.
- If this is not specified, *timestamp-format* is used instead.+ If this is empty, *timestamp-format* is used instead.++ Default: _Jan 02_*message-view-timestamp-format* = _<timeformat>_
If set, overrides *timestamp-format* for the message view.
+ Default: _2006 Jan 02, 15:04 GMT-0700_+*message-view-this-day-time-format* = _<timeformat>_
If set, overrides *timestamp-format* in the message view for messages
that were received/sent today.
@@ -170,7 +177,7 @@ These options are configured in the *[ui]* section of _aerc.conf_.
Width of the sidebar, including the border. Set to zero to disable the
sidebar.
- Default: _20_+ Default: _22_*empty-message* = _<string>_
Message to display when viewing an empty folder.
@@ -210,13 +217,13 @@ These options are configured in the *[ui]* section of _aerc.conf_.
The template to use for composer tab titles. See *aerc-templates*(7) for
available field names.
- Default: _{{.Subject}}_+ Default: _{{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}_*tab-title-viewer* = _<go_template>_
The template to use for viewer tab titles. See *aerc-templates*(7) for
available field names.
- Default: _{{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}_+ Default: _{{.Subject}}_*pinned-tab-marker* = _"<string>"_
Marker to show before a pinned tab's name.
@@ -261,7 +268,7 @@ These options are configured in the *[ui]* section of _aerc.conf_.
Template for the right side of the directory list.
See *aerc-templates*(7) for all available fields and functions.
- Default: _{{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}_+ Default: _{{if .Unread}}{{humanReadable .Unread}}{{end}}_*dirlist-delay* = _<duration>_
Delay after which the messages are actually listed when entering
@@ -497,7 +504,7 @@ following configurable prefix parts:
*thread-prefix-folded* = _<string>_
Define the folded thread indicator.
- Default: _""_+ Default: _"+"_*thread-prefix-unfolded* = _<string>_
Define the unfolded thread indicator.
@@ -554,7 +561,7 @@ Default settings (mutt-style):
[PATCH aerc v5] ui: allow thread arrow customisation
├─>[aerc/patches] build success
├─>Re: [PATCH aerc v5] ui: allow thread arrow customisation
- ├─+ ├─+ └─>
├─>
│ ├─>
@@ -655,7 +662,7 @@ These options are configured in the *[statusline]* section of _aerc.conf_.
```
column-left = [{{.Account}}] {{.StatusInfo}}
column-center = {{.PendingKeys}}
- column-right = {{.TrayInfo}}+ column-right = {{.TrayInfo}} | {{cwd}} ```
See *aerc-templates*(7) for all available symbols and functions.
diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd
index 8083888b14b4..497740124989 100644
--- a/doc/aerc-stylesets.7.scd+++ b/doc/aerc-stylesets.7.scd
@@ -348,31 +348,37 @@ _<Dec number>_
Before parsing a styleset, it is first initialized with the following defaults:
```
-*.selected.reverse=toggle-title.reverse=true-header.bold=true-*error.bold=true-error.fg=red-warning.fg=yellow-success.fg=green-statusline*.default=true-statusline_default.reverse=true-statusline_error.fg=red-statusline_error.reverse=true-statusline_warning.fg=yellow-statusline_warning.reverse=true-msglist_unread.bold=true-msglist_deleted.fg=gray-msglist_result.fg=green-msglist_pill.reverse=true-part_mimetype.dim=true-part_mimetype.selected.dim=false-part_filename.selected.bold=true-completion_pill.reverse=true-tab.reverse=true-border.reverse = true-selector_focused.reverse=true-selector_chooser.bold=true+*.selected.bg = 12+*.selected.fg = 15+*.selected.bold = true+statusline_*.dim = true+statusline_*.bg = 8+statusline_*.fg = 15+*warning.fg = 3+*success.fg = 2+*error.fg = 1+*error.bold = true+border.bg = 12+border.fg = 15+title.bg = 12+title.fg = 15+title.bold = true+header.fg = 4+header.bold = true+msglist_unread.bold = true+msglist_deleted.dim = true+msglist_marked.bg = 6+msglist_marked.fg = 15+msglist_pill.bg = 12+msglist_pill.fg = 15+part_mimetype.fg = 12+selector_chooser.bold = true+selector_focused.bold = true+selector_focused.bg = 12+selector_focused.fg = 15+completion_pill.bg = 12+completion_default.bg = 8+completion_default.fg = 15```
You can choose either to reset everything by starting your styleset with these
diff --git a/stylesets/default b/stylesets/default
index 74bbe97a068c..8e0ffc3fb412 100644
--- a/stylesets/default+++ b/stylesets/default
@@ -1,3 +1,4 @@
+# vim: ft=dosini#
# aerc default styleset
#
@@ -7,41 +8,48 @@
# modifying or creating a styleset.
# Uncomment these two lines to reset all attributes and start from scratch.
-#*.default=true-#*.normal=true+#*.default = true+#*.normal = true-#*.selected.reverse=toggle-#-#title.reverse=true-#header.bold=true+#*.selected.bg = 12+#*.selected.fg = 15+#*.selected.bold = true-#*error.bold=true-#error.fg=red-#warning.fg=yellow-#success.fg=green+#statusline_*.dim = true+#statusline_*.bg = 8+#statusline_*.fg = 15-#statusline*.default=true-#statusline_default.reverse=true-#statusline_error.fg=red-#statusline_error.reverse=true-#statusline_warning.fg=yellow-#statusline_warning.reverse=true+#*warning.fg = 3+#*success.fg = 2+#*error.fg = 1+#*error.bold = true-#msglist_unread.bold=true-#msglist_deleted.fg=gray-#msglist_result.fg=green-#msglist_pill.reverse=true+#border.bg = 12+#border.fg = 15+#title.bg = 12+#title.fg = 15+#title.bold = true-#part_mimetype.dim=true-#part_mimetype.selected.dim=false-#part_filename.selected.bold=true-#completion_pill.reverse=true+#header.fg = 4+#header.bold = true-#tab.reverse=true-#border.reverse = true+#msglist_unread.bold = true+#msglist_deleted.dim = true+#msglist_marked.bg = 6+#msglist_marked.fg = 15+#msglist_pill.bg = 12+#msglist_pill.fg = 15-#selector_focused.reverse=true-#selector_chooser.bold=true+#part_mimetype.fg = 12++#selector_chooser.bold = true+#selector_focused.bold = true+#selector_focused.bg = 12+#selector_focused.fg = 15++#completion_pill.bg = 12+#completion_default.bg = 8+#completion_default.fg = 15#[viewer]
#url.underline=true
@@ -54,3 +62,6 @@
#quote_*.fg=6
#quote_*.dim=true
#quote_1.dim=false
++[user]+thread.fg = 1
--
2.43.0
On Sat Feb 10, 2024 at 1:20 AM CET, Robin Jarry wrote:
> this is a follow up on the colorize default theme fix for light> backgrounds. After thinking about it some more, I found the default> theme for the whole application really lacks color and also does not use> any of the shiny new features that were added since I took over the> maintenance.
Something's wrong (I have exported all three patches to separate
files to be certain):
tumbleweed-pkg~/b/m/a/aerc (devel)$ git diff origin/master -- stylesets/*
tumbleweed-pkg~/b/m/a/aerc (devel)$
tumbleweed-pkg~/b/m/a/aerc (devel)$ git am /tmp/first.patch
Applying: config: add missing settings in aerc.conf
tumbleweed-pkg~/b/m/a/aerc (devel)$ git am /tmp/second.patch
Applying: config: change default appearance
tumbleweed-pkg~/b/m/a/aerc (devel)$ git am /tmp/third.patch
Applying: colorize: preserve defaults unless overridden
error: patch failed: stylesets/blue:57
error: stylesets/blue: patch does not apply
error: patch failed: stylesets/pink:57
error: stylesets/pink: patch does not apply
Patch failed at 0001 colorize: preserve defaults unless overridden
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
tumbleweed-pkg~/b/m/a/aerc (devel|AM 1/1)$ git status
On branch devel
Your branch and 'myrepo/devel' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" if you want to integrate the remote branch with yours)
You are in the middle of an am session.
(fix conflicts and then run "git am --continue")
(use "git am --skip" to skip this patch)
(use "git am --abort" to restore the original branch)
nothing to commit, working tree clean
tumbleweed-pkg~/b/m/a/aerc (devel|AM 1/1)$
Best,
Matěj
--
http://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
Why should I travel, when I’m already there?
-- Bostonian lady, when being asked why she never visited
other places than Boston
Matěj Cepl, Feb 10 2024:
> On Sat Feb 10, 2024 at 1:20 AM CET, Robin Jarry wrote:>> this is a follow up on the colorize default theme fix for light>> backgrounds. After thinking about it some more, I found the default>> theme for the whole application really lacks color and also does not use>> any of the shiny new features that were added since I took over the>> maintenance.>> Something's wrong (I have exported all three patches to separate> files to be certain):
There are 4 patches in the series. Maybe you didn't receive one? Also, the series contains the colorize patch slightly modified. Make sure to remove the one you had in v2.
curl https://lists.sr.ht/~rjarry/aerc-devel/patches/49332/mbox | git am -3 --empty=drop
Robin,
Robin Jarry, 2024-02-10T01:20:26+01:00:
> To be consistent with stylesets for the rest of aerc's UI, settings in> the [viewer] section now only overrides the default colorize theme.
thank you very much for this!
> Changelog-changed: The `[viewer]` section of stylesets now preserve> default values as documented in `aerc-stylesets(7)` unless explicitly> overridden.> Requested-by: Karel Balej <balejk@matfyz.cz>> Signed-off-by: Robin Jarry <robin@jarry.cc>
Since I have opened a ticket for this, you probably want to have
Implements here too :-)
Otherwise, it seems to work, so
Tested-by: Karel Balej <balejk@matfyz.cz>
Cool new default styleset by the way :-)
Thanks again,
K. B.
After applying this patch set, with theme "nord", the background and
foreground of a selected email in the index are the same colour, if
that email is flagged.
--
👱🏻 Jonathan Dowland
✎ jon@dow.land
🔗 https://jmtd.net
On Sat Feb 10, 2024 at 9:11 AM GMT, Jonathan Dowland wrote:
> After applying this patch set, with theme "nord", the background and> foreground of a selected email in the index are the same colour, if> that email is flagged.
Sorry, false alarm: I had mismatched stylesets directory setting with
the version of aerc I was running.
(I now symlink ~/.config/aerc/stylesets to my git directory, but this
won't scale if I want to keep more than one build around.)
--
👱🏻 Jonathan Dowland
✎ jon@dow.land
🔗 https://jmtd.net
On Fri Feb 9, 2024 at 7:20 PM EST, Robin Jarry wrote:
> 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.
While we're making a bunch of changes, I think the default borders could
use some improvement. I have
border-char-vertical=│
border-char-horizontal=─
in my aerc.conf and then set border.bg to match the normal bg and
border.fg as something that contrasts.
The result is thin lines for borders instead of the fat (IMO ugly) lines
created by highlighting an entire terminal cell.
Other than that, I'd agree that these are generally better defaults. It
certainly isn't dull with my terminal colors :)
Best,
Jason
On Fri Feb 9, 2024 at 7:20 PM EST, Robin Jarry wrote:
> +#column-subject={{.Style .ThreadPrefix "thread"}}{{.Subject}}
It's odd to me that we're using a custom style here. If we want to style
the thread prefix differently by default, I think that we should find a
way to do it with the built-in styles. I was confused as to why my
thread prefixes were still red, even after resetting all the styles, and
couldn't find anything in aerc-stylesets(7) to help.
On Fri Feb 9, 2024 at 7:20 PM EST, Robin Jarry wrote:
> [viewer]> +*.normal=true> +*.default=true
I think it's worth an addition to aerc-stylesets(7) to note that these
two lines are needed in the viewer section to reset styles there, even
if they were already present at the beginning of the file. The current
language at the end of the DEFAULTS section seems to imply that putting
those lines at the beginning resets everything. (Alternatively, we could
just do what the current docs imply and make resetting the styles at the
top of the file apply to the viewer as well -- it's a bit odd to need to
reset them twice.)
On Sat Feb 10, 2024 at 8:34 AM CET, Robin Jarry wrote:
> There are 4 patches in the series. Maybe you didn't receive one? Also, the series contains the colorize patch slightly modified. Make sure to remove the one you had in v2.>> curl https://lists.sr.ht/~rjarry/aerc-devel/patches/49332/mbox | git am -3 --empty=drop
Yes, this works. Thank you.
Matěj
--
http://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
Microwave oven? Whaddya mean, it’s a microwave oven? I’ve been
watching Channel 4 on the thing for two weeks.
On Sat Feb 10, 2024 at 10:06 AM CET, Karel Balej wrote:
> Since I have opened a ticket for this, you probably want to have> Implements here too :-)
Now we can compete who was bothering Robin more? Certainly
Tested-by: Matěj Cepl <mcepl@cepl.eu>
as well. That change of default is quite drastic, but so far I
like it! Certainly, it is much more readable.
Matěj
--
http://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
To the well-organized mind, death is but the next great adventure.
-- Albus Dumbledore