aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDean <gao.dean@hotmail.com>2023-01-11 14:33:11 +1100
committerRobin Jarry <robin@jarry.cc>2023-01-11 14:13:14 +0100
commitd73f50f272de210fe4957ff107e1ff88887f1c20 (patch)
tree8d954aacd76c3db81a78aff64ca2bc47f4951deb /config
parentc6142b2267f689d5be893f6750e514fa9ba5f93c (diff)
downloadaerc-d73f50f272de210fe4957ff107e1ff88887f1c20.tar.gz
spinner: add spinner-interval config option
The default 200ms between each spinner frame can be unsuitable for spinners with many frames, so this adds a spinner-interval config option with type `time.Duration` to specify the interval between frames. The default is still the usual 200ms. Signed-off-by: Dean <gao.dean@hotmail.com> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'config')
-rw-r--r--config/ui.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/config/ui.go b/config/ui.go
index 0994d993..e9b1a2b2 100644
--- a/config/ui.go
+++ b/config/ui.go
@@ -45,6 +45,7 @@ type UIConfig struct {
NewMessageBell bool `ini:"new-message-bell"`
Spinner string `ini:"spinner"`
SpinnerDelimiter string `ini:"spinner-delimiter"`
+ SpinnerInterval time.Duration `ini:"spinner-interval"`
IconUnencrypted string `ini:"icon-unencrypted"`
IconEncrypted string `ini:"icon-encrypted"`
IconSigned string `ini:"icon-signed"`
@@ -150,6 +151,7 @@ func defaultUiConfig() *UIConfig {
FuzzyComplete: false,
Spinner: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ",
SpinnerDelimiter: ",",
+ SpinnerInterval: 200 * time.Millisecond,
IconUnencrypted: "",
IconSigned: "[s]",
IconEncrypted: "[e]",