@@ -37,21 +37,27 @@ type TitleValues struct {
3737 Baseboard string `json:"baseboard"`
3838 ProcessCount string `json:"processCount"`
3939 Uptime string `json:"uptime"`
40+ Network string `json:"network"`
4041}
4142
4243func updateConfig (config Config ) {
4344 user , _ := user .Current ()
4445 if config .Version == 0 {
4546 config .AutoUpdate = true
47+ config .Version = 1
48+ }
49+ if config .Version == 1 {
50+ config .Titles .Network = "Local IP"
51+ config .Format = append (config .Format , "network" )
52+ config .Version = 2
4653 }
47- config .Version = 1
4854 file , _ := json .MarshalIndent (config , "" , " " )
4955 _ = ioutil .WriteFile (user .HomeDir + "\\ .winfetch.json" , file , 0644 )
5056}
5157
5258func newConfig () Config {
5359 config := Config {}
54- config .Format = []string {"user" , "sep" , "uptime" , "mem" , "cpu" , "procs" , "cpuCores" , "cpuThreads" , "disk" , "wversion" , "gpus" , "bios" , "baseboard" }
60+ config .Format = []string {"user" , "sep" , "uptime" , "mem" , "cpu" , "procs" , "cpuCores" , "cpuThreads" , "disk" , "wversion" , "gpus" , "bios" , "baseboard" , "network" }
5561 config .ShowASCII = true
5662 config .UseSmallASCII = false
5763 config .UseCustomASCII = false
@@ -73,6 +79,7 @@ func newConfig() Config {
7379 config .Titles .Uptime = "Uptime"
7480 config .Titles .ProcessCount = "Processes"
7581 config .Titles .CPU = "CPU #"
82+ config .Titles .Network = "Local IP"
7683 config .AutoUpdate = true
7784 config .Version = 1
7885 return config
0 commit comments