diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-02-27 09:18:16 -0600 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-03-02 23:04:35 +0100 |
commit | d9a8edd8e9269aa1189d55c8d13caa05084435f5 (patch) | |
tree | 65ee1373e485902a82155f6b52ebee59403b91e7 /models | |
parent | 8f8e22dbdd4f9e2ff1604e47e0fc78ff5912d633 (diff) | |
download | aerc-d9a8edd8e9269aa1189d55c8d13caa05084435f5.tar.gz |
templates: allow inline user styles
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>
Diffstat (limited to 'models')
-rw-r--r-- | models/templates.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/templates.go b/models/templates.go index 4886b83c..916b3974 100644 --- a/models/templates.go +++ b/models/templates.go @@ -40,4 +40,5 @@ type TemplateData interface { StatusInfo() string TrayInfo() string PendingKeys() string + Style(string, string) string } |