aboutsummaryrefslogtreecommitdiffstats
path: root/lib/statusline/folderstate.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-04-18 16:06:27 +0200
committerRobin Jarry <robin@jarry.cc>2022-04-25 11:21:07 +0200
commitce18e928813526e59462e391c09e868c62facb42 (patch)
tree9898097ca19e9aea7792f08ec8694a25432b83b1 /lib/statusline/folderstate.go
parenteb7e45d43be883c4be0e635875846f0d7ddca485 (diff)
downloadaerc-ce18e928813526e59462e391c09e868c62facb42.tar.gz
statusline: refactor to make it more customizable
Refactor statusline by clearly separating the rendering part from the text display. Use printf-like format string for statusline customization. Document printf-like format string to customize the statusline. Allow to completely mute the statusline (except for push notifications) with a format specifier. Provide a display mode with unicode icons for the status elements. Implements: https://todo.sr.ht/~rjarry/aerc/34 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/statusline/folderstate.go')
-rw-r--r--lib/statusline/folderstate.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/statusline/folderstate.go b/lib/statusline/folderstate.go
deleted file mode 100644
index ff470b72..00000000
--- a/lib/statusline/folderstate.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package statusline
-
-type folderState struct {
- Search string
- Filter string
- FilterActivity string
- Sorting string
-
- Threading string
-}
-
-func (fs *folderState) State() []string {
- var line []string
-
- if fs.FilterActivity != "" {
- line = append(line, fs.FilterActivity)
- } else {
- if fs.Filter != "" {
- line = append(line, fs.Filter)
- }
- }
- if fs.Search != "" {
- line = append(line, fs.Search)
- }
- if fs.Sorting != "" {
- line = append(line, fs.Sorting)
- }
- if fs.Threading != "" {
- line = append(line, fs.Threading)
- }
- return line
-}