Skip to content

Commit

Permalink
fix: set default colors when config file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Dec 30, 2024
1 parent d884d9c commit c9d5ee2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/gdu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func init() {
flags.BoolVar(&af.WriteConfig, "write-config", false, "Write current configuration to file (default is $HOME/.gdu.yaml)")

initConfig()
setDefaults()
}

func initConfig() {
Expand All @@ -93,7 +94,9 @@ func initConfig() {
}

configErr = yaml.Unmarshal(data, &af)
}

func setDefaults() {
if af.Style.Footer.BackgroundColor == "" {
af.Style.Footer.BackgroundColor = "#2479D0"
}
Expand Down

0 comments on commit c9d5ee2

Please sign in to comment.