| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Allow for messages marked with the forwarded flag to be styled
differently.
Changelog-added: Forwarded messages can be styled differently in the
message list.
Signed-off-by: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Show all threading associations even when not all nodes are present.
Indicate if a thread is incomplete, i.e. misses a direct parent node.
Use the `msglist_thread_orphan.fg=red` styleobject in your stylesheet to
indicate whether a messsage has a missing parent.
Also use a different thread prefix ("┬─" instead of "├─") not to confuse
them with regular threads that have a visible parent.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
|
|
|
|
|
|
|
|
|
| |
Include the styleset filepath and exact statement that caused the error.
Remove the "failed to load config: " prefix in the error message. The
line is often very long already.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Replace all tcell.Style objects with vaxis.Style objects
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a UI config value to enable showing of "thread-context", similar
to `notmuch show --entire-thread=true`. Add an associated style called
"msglist_thread_context" which can be used to style such messages.
Currently this feature is only supported by notmuch. It would be
possible for maildir to implement as well, IMAP with gmail custom
extensions, and JMAP. This patch merely implements the notmuch version
and puts the groundwork in for handling these sorts of displays.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Allow styling the part selector mime type and (if any) attachment
filename. Remove custom alignment code since now both can be
differentiated easily with colors and/or attributes.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
github.com/mitchellh/go-homedir has not received any update since 2019.
The last release of github.com/kyoh86/xdg was in 2020 and it has been
marked as deprecated by its author.
Replace these with internal functions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
| |
Allow a user to change the default style of the message list scrollbar.
There is no easy way to set the default style for an object directly in
code, so I've updated every built-in theme to preserve the existing
style.
Signed-off-by: Konstantin Shelekhin <k.shelekhin@ftml.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add a style for folded threads. Use msglist_thread_folded in the
stylesheet like "msglist_thread_folded.dim = true"
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a user sets multiple dynamic styles, only the first one is applied.
The parsing function is modifying the matching pattern prior to saving
it to the style. When a second occurrence of the same dynamic style is
seen, the patterns don't match because we compare against the raw user
input instead of the modified pattern value. Store the raw user input as
the pattern instead of our modified regex.
Fixes: 2f46f64b0b0b ("styleset: allow dynamic msglist styling")
Reported-by: Drew Devault <sir@cmpwn.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Drew Devault <sir@cmpwn.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stylesets are parsed in two passes. The first pass skips the
.selected keys and updates the attributes and colors of both the objects
and selected maps. The second pass is supposed to only update the
selected map of the pointed style objects.
The boolean logic was incorrect, the .selected styles were applied on
normal objects as well which led to confusing behaviour most
specifically when using *.selected.toggle=true.
Properly parse .selected elements.
Fixes: 47675e80850d ("config: rework styleset parsing")
Reported-by: John Mcenroy <handplanet@outlook.com>
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for dynamic msglist*.$HEADER,$VALUE.$ATTR = $VALUE where
$VALUE can be either a fixed string or a regular expression. This is
intended as a replacement of contextual ui sections based on subject
values.
Implements: https://todo.sr.ht/~rjarry/aerc/18
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
Simplify code. Prepare for dynamic styling of the message list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Inherit from the lower layers colors unless explicitly overridden in
upper layers.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using {{.Style "foo" bar}} and "foo" is not defined in the styleset
under the [user] section, there is an obscure error:
template: column-right:1:18: executing "column-right" at <.Style>:
error calling Style: runtime error: invalid memory address or nil
pointer dereference
Which is most of the time truncated and can only be read in logs.
Referencing an undefined style is not a serious problem. Return the
default tcell style in that case and avoid the error.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow custom user-defined styles in a styleset. The styles can take any
name, and must be under the [user] ini section. All attributes apply to
user defined styles.
Example:
[user]
red.fg=red
red.bold=true
Add a .Style function which accepts the name of a user-defined style and
applies it to the string.
{{.Style "red" "foo"}}
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since its introduction, we had multiple issues with the colorize awk
script with regard to non-GNU awk compatibility.
Also, this script is standalone and the color theme must be hard coded
into it. Reading from an external configuration file (aerc's styleset)
from a non-GNU awk is close to impossible (and even far from trivial
with GNU awk).
Rewrite the builtin colorize filter in C to allow getting the color
theme from aerc's active styleset. The theme is configured using the
existing styleset syntax and attributes under a separate [viewer]
section (see examples and man page).
Export the active styleset file path to AERC_STYLESET env var when
invoking the filter command so that colorize can access it and use it.
I have tested compilation (with clang-analyzer and gcc -fanalyzer) and
basic operation on FreeBSD, Fedora (glibc) and Alpine (muslibc). More
tests would probably be required on MacOSX and older Linux distros.
I also added test vectors to give some confidence that this works as
expected. The execution with these vectors passed valgrind
--leak-check=full without errors.
NB: the default theme has changed to be more minimal. Sample stylesets
have more colorful examples. The awk -v theme=xxx option is no longer
supported.
usage: colorize [-h] [-s FILE] [-f FILE]
options:
-h show this help message
-s FILE use styleset file (default $AERC_STYLESET)
-f FILE read from filename (default stdin)
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
Allow defining <obj>.dim=true to turn on half-bright text.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
Add a style for messages that have been marked as answered, and a
"msglist_answered" config option for it.
Signed-off-by: Martin Lucina <martin@lucina.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Add italic option to style config. Update docs.
Suggested-by: inwit <inwit@sindominio.net>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Add option to style search results in the message list. Set default
style for results.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Add a warning style to default statusline. Add methods to status, aerc,
and account to push a warning message.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Run `make fmt`.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Adds two style options: dirlist_unread and dirlist_recent. These options
apply in layers, in the same way as msglist_* styles do.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Make it possible to specify the color in the style sets by number in
addition to the color name. This allows using colors defined by the
terminal.
Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Also update to the tcell v2 PaletteColor api, which should keep the chosen
theme of the user intact.
Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop
clipping the value to one of the theme colors.
Generally this is desired behaviour though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow styles to be layered over a base style. The list of styles to
apply is layered over the base style in order, such that if the layer
does not differ from the base it is not used. The order that these
styles are applied in is, from first to last:
msglist_default
msglist_unread
msglist_read (exclusive with unread, so technically the same level)
msglist_flagged
msglist_deleted
msglist_marked
So, msglist_marked style dominates.
This fixes an issue where the msglist_deleted style was not being applied.
|
| |
|
|
|
|
|
|
| |
Without the option SpaceBeforeInlineComment set, go-ini will parse just
a single "
This lead to people being unable to specify hex color codes
|
|
|
|
|
|
| |
Introduce the ability to configure stylesets, allowing customization of
aerc's look (color scheme, font weight, etc). Default styleset is
installed to /path/to/aerc/stylesets/default.
|
|
|
|
| |
This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
|
|
|
|
|
|
| |
Introduce the ability to configure stylesets, allowing customization of
aerc's look (color scheme, font weight, etc). Default styleset is
installed to /path/to/aerc/stylesets/default.
|
|
|
|
| |
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
|
|
The following functionalities are added to configure aerc ui styles.
- Read stylesets from file with very basic fnmatch wildcard matching
- Add default styleset
- Support different stylesets as part of UiConfig allowing contextual
styles.
- Move widgets/ui elements to use the stylesets.
- Add configuration manual for the styleset
|