diff options
author | Robin Jarry <robin@jarry.cc> | 2023-09-11 17:52:47 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-09-19 16:49:59 +0200 |
commit | 320aa2257f5b5f4ef516eccc3ab2bd49b79d0fdb (patch) | |
tree | 75a12e13e29f2c793ff2768408c596897defe914 /doc | |
parent | d4e49c79a69c399702c3c781920c8eae5b9e22ba (diff) | |
download | aerc-320aa2257f5b5f4ef516eccc3ab2bd49b79d0fdb.tar.gz |
config: add default values for empty stylesets
When adding new style objects it is impossible to give them a default
color nor attributes without modifying each existing user styleset.
Also, if the user has an incomplete styleset, some parts of aerc will
have no style at all. These quirks are not nice from a user experience
point of view.
Before parsing the user styleset, initialize aerc style with basic
defaults. Reuse the exact same content than the actual "default"
styleset provided in /usr/share/aerc/stylesets. Comment all of the
default styleset to make it obvious that these are default values.
This has some implications:
* To reset these defaults, the user styleset must now start with these
two lines:
*.default = true
*.normal = true
If these two lines are not present, the default style will be kept and
only changed if the user styleset explicitly sets them.
* Empty stylesets no longer produce weird results.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/aerc-stylesets.7.scd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd index 9d54e0be..3050eab7 100644 --- a/doc/aerc-stylesets.7.scd +++ b/doc/aerc-stylesets.7.scd @@ -334,6 +334,45 @@ _<Dec number>_ Color based on the terminal palette index. Valid numbers are between _0_ and _255_. +# DEFAULTS + +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 +completion_pill.reverse=true +tab.reverse=true +border.reverse = true +selector_focused.reverse=true +selector_chooser.bold=true +``` + +You can choose either to reset everything by starting your styleset with these +two lines: + +``` +*.default=true +*.normal=true +``` + +Or selectively override style object attributes. + # SEE ALSO *aerc*(1) *aerc-config*(5) |