From e4104a867401e383ef2b45f4c449b8b3fa25e69b Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 29 Aug 2019 15:30:35 -1000 Subject: 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 --- config/config.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config') 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{ -- cgit v1.2.3