about summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2019-08-29 15:30:35 -1000
committerDrew DeVault <sir@cmpwn.com>2019-08-30 10:32:28 +0900
commite4104a867401e383ef2b45f4c449b8b3fa25e69b (patch)
tree74a0ec139b3630e1f9963122d3ffa2809aaf0616 /config
parentf13f9a86849ff8b4616aa7b462ed171833e02a95 (diff)
downloadaerc-e4104a867401e383ef2b45f4c449b8b3fa25e69b.tar.gz
Allow custom spinner via config file
Allows to set `ui.spinner=` to a string which is then split by
`ui.spinner-delimiter=` (Default: comma) instead of having a hard coded
animation.

This implementation doesn't use INIs capabilities to split strings as
it trims whitespaces breaking the default animation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'config')
-rw-r--r--config/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 5736678..06caec1 100644
--- a/config/config.go
+++ b/config/config.go
@@ -33,6 +33,8 @@ type UIConfig struct {
 	EmptyDirlist      string   `ini:"empty-dirlist"`
 	MouseEnabled      bool     `ini:"mouse-enabled"`
 	NewMessageBell    bool     `ini:"new-message-bell"`
+	Spinner           string   `ini:"spinner"`
+	SpinnerDelimiter  string   `ini:"spinner-delimiter"`
 }
 
 const (
@@ -347,6 +349,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
 			EmptyDirlist:      "(no folders)",
 			MouseEnabled:      false,
 			NewMessageBell:    true,
+			Spinner:
+				 "[..]    , [..]   ,  [..]  ,   [..] ,    [..],   [..] ,  [..]  , [..]   ",
+			SpinnerDelimiter: ",",
 		},
 
 		Viewer: ViewerConfig{
2006-07-15 17:00:56 +0200 proceeded with cleaning up, sorting functions, etc' href='/acidbong/suckless/dwm/commit/util.c?h=4.4&id=adaa28a6e600f636f5e86244ccef69e98419ba1a'>adaa28a ^
39677ec ^








39677ec ^
adaa28a ^




849e631 ^
adaa28a ^


c47da14 ^
439e15d ^
c47da14 ^
586f663 ^
439e15d ^




16c67f3 ^
586f663 ^
650a1fb ^
439e15d ^

849e631 ^
439e15d ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61