1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

Add SpinnerConfig

This new config section allows to customize frames and rate of
thespinner
This commit is contained in:
Artem Belyakov
2024-04-06 13:35:50 +02:00
committed by Stefan Haller
parent 53f0c4aeff
commit f3dba743f0
15 changed files with 101 additions and 31 deletions

View File

@@ -145,6 +145,8 @@ type GuiConfig struct {
// How things are filtered when typing '/'.
// One of 'substring' (default) | 'fuzzy'
FilterMode string `yaml:"filterMode" jsonschema:"enum=substring,enum=fuzzy"`
// Config relating to the spinner.
Spinner SpinnerConfig `yaml:"spinner"`
}
func (c *GuiConfig) UseFuzzySearch() bool {
@@ -182,6 +184,13 @@ type CommitLengthConfig struct {
Show bool `yaml:"show"`
}
type SpinnerConfig struct {
// The frames of the spinner animation.
Frames []string `yaml:"frames"`
// The "speed" of the spinner in milliseconds.
Rate int `yaml:"rate" jsonschema:"minimum=1"`
}
type GitConfig struct {
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
Paging PagingConfig `yaml:"paging"`
@@ -671,6 +680,10 @@ func GetDefaultConfig() *UserConfig {
AnimateExplosion: true,
PortraitMode: "auto",
FilterMode: "substring",
Spinner: SpinnerConfig{
Frames: []string{"|", "/", "-", "\\"},
Rate: 50,
},
},
Git: GitConfig{
Paging: PagingConfig{