Factor out common config setup functions in demo package

This commit is contained in:
Jesse Duffield 2023-08-12 16:52:40 +10:00
parent 26989ce0ee
commit b1bc437d1b
15 changed files with 34 additions and 25 deletions

View file

@ -0,0 +1,19 @@
package demo
import "github.com/jesseduffield/lazygit/pkg/config"
// Gives us nicer colours when we generate a git repo history with `shell.CreateRepoHistory()`
func setGeneratedAuthorColours(config *config.AppConfig) {
config.UserConfig.Gui.AuthorColors = map[string]string{
"Fredrica Greenhill": "#fb5aa3",
"Oscar Reuenthal": "#86c82f",
"Paul Oberstein": "#ffd500",
"Siegfried Kircheis": "#fe7e11",
"Yang Wen-li": "#8e3ccb",
}
}
func setDefaultDemoConfig(config *config.AppConfig) {
// demos look much nicers with icons shown
config.UserConfig.Gui.NerdFontsVersion = "3"
}