aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorinwit <inwit@sindominio.net>2024-01-29 20:45:47 +0100
committerRobin Jarry <robin@jarry.cc>2024-01-29 22:45:25 +0100
commit0c2af2e354541632c708a1a7d6eb04c1e2a951ae (patch)
tree94bf8c468cc2ab423294630055a696dbb3a8014e /config
parentc48d27b07b90fab54198287c552646607f401228 (diff)
downloadaerc-0c2af2e354541632c708a1a7d6eb04c1e2a951ae.tar.gz
ui: allow thread arrow customization
The thread prefix appearance is inspired by mutt and has been regarded by some as too wide and not very aesthetically pleasing. Nevertheless, it has some technical limitations, like not being able to show if a thread is folded. Allow for full customisation of the thread prefix by introducing 14 new config options. Dirlist is not affected. Changelog-added: Thread arrow prefixes are now fully configurable. Co-authored-by: Robin Jarry <robin@jarry.cc> Signed-off-by: inwit <inwit@sindominio.net> Tested-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config')
-rw-r--r--config/aerc.conf98
-rw-r--r--config/ui.go15
2 files changed, 113 insertions, 0 deletions
diff --git a/config/aerc.conf b/config/aerc.conf
index 30c3c7bb..ac2a6847 100644
--- a/config/aerc.conf
+++ b/config/aerc.conf
@@ -335,6 +335,104 @@
# Default: 50ms
#client-threads-delay=50ms
+#
+# Thread prefix customization:
+
+#
+# Customize the thread prefix appearance by selecting the arrow head.
+#
+# Default: ">"
+#thread-prefix-tip = ">"
+
+#
+# Customize the thread prefix appearance by selecting the arrow indentation.
+#
+# Default: " "
+#thread-prefix-indent = " "
+
+#
+# Customize the thread prefix appearance by selecting the vertical extension of
+# the arrow.
+#
+# Default: "│"
+#thread-prefix-stem = "│"
+
+#
+# Customize the thread prefix appearance by selecting the horizontal extension
+# of the arrow.
+#
+# Default: ""
+#thread-prefix-limb = ""
+
+#
+# Customize the thread prefix appearance by selecting the folded thread
+# indicator.
+#
+# Default: ""
+#thread-prefix-folded = ""
+
+#
+# Customize the thread prefix appearance by selecting the unfolded thread
+# indicator.
+#
+# Default: ""
+#thread-prefix-unfolded = ""
+
+#
+# Customize the thread prefix appearance by selecting the first child connector.
+#
+# Default: ""
+#thread-prefix-first-child = ""
+
+#
+# Customize the thread prefix appearance by selecting the connector used if
+# the message has siblings.
+#
+# Default: "├─"
+#thread-prefix-has-siblings = "├─"
+
+#
+# Customize the thread prefix appearance by selecting the connector used if the
+# message has no parents and no children.
+#
+# Default: ""
+#thread-prefix-lone = ""
+
+#
+# Customize the thread prefix appearance by selecting the connector used if the
+# message has no parents and has children.
+#
+# Default: ""
+#thread-prefix-orphan = ""
+
+#
+# Customize the thread prefix appearance by selecting the connector for the last
+# sibling.
+#
+# Default: "└─"
+#thread-prefix-last-sibling = "└─"
+
+#
+# Customize the reversed thread prefix appearance by selecting the connector for
+# the last sibling.
+#
+# Default: "┌─"
+#thread-prefix-last-sibling-reverse = "┌─"
+
+#
+# Customize the reversed thread prefix appearance by selecting the first child
+# connector.
+#
+# Default: ""
+#thread-prefix-first-child-reverse = ""
+
+#
+# Customize the reversed thread prefix appearance by selecting the connector
+# used if the message has no parents and has children.
+#
+# Default: ""
+#thread-prefix-orphan-reverse = ""
+
[statusline]
#
# Describes the format for the status line. This is a comma separated list of
diff --git a/config/ui.go b/config/ui.go
index 83b45230..9a97d4ef 100644
--- a/config/ui.go
+++ b/config/ui.go
@@ -78,6 +78,21 @@ type UIConfig struct {
ReverseThreadOrder bool `ini:"reverse-thread-order"`
SortThreadSiblings bool `ini:"sort-thread-siblings"`
+ ThreadPrefixTip string `ini:"thread-prefix-tip" default:">"`
+ 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:""`
+ ThreadPrefixUnfolded string `ini:"thread-prefix-unfolded" default:""`
+ ThreadPrefixFirstChild string `ini:"thread-prefix-first-child" default:""`
+ ThreadPrefixHasSiblings string `ini:"thread-prefix-has-siblings" default:"├─"`
+ ThreadPrefixLone string `ini:"thread-prefix-lone" default:""`
+ ThreadPrefixOrphan string `ini:"thread-prefix-orphan" default:""`
+ ThreadPrefixLastSibling string `ini:"thread-prefix-last-sibling" default:"└─"`
+ ThreadPrefixLastSiblingReverse string `ini:"thread-prefix-last-sibling-reverse" default:"┌─"`
+ ThreadPrefixFirstChildReverse string `ini:"thread-prefix-first-child-reverse" default:""`
+ ThreadPrefixOrphanReverse string `ini:"thread-prefix-orphan-reverse" default:""`
+
// Tab Templates
TabTitleAccount *template.Template `ini:"tab-title-account" default:"{{.Account}}"`
TabTitleComposer *template.Template `ini:"tab-title-composer" default:"{{.Subject}}"`