diff --git a/main.go b/main.go index 8b879dc..4c117e2 100644 --- a/main.go +++ b/main.go @@ -101,8 +101,15 @@ func main() { case "defaults": // Show Defaults - for i := range state.account.ActiveCalendars { - fmt.Println(state.account.ActiveCalendars[i]) + for _, v := range state.account.ActiveCalendars { + if c, err := state.account.GetCalendarById(v); err == nil { + var colDef *calendar.ColorDefinition + if colDef, err = state.account.GetCalendarColor(c.Id); err != nil { + fmt.Println(err.Error()) + return + } + fmt.Println(CalColToAnsi(*colDef).Sprint(" ") + " " + colDef.Background + " " + c.Summary) + } } case "delete": @@ -451,7 +458,7 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color { return colCyan, nil case "#f83a22", "#ac725e": return colRed, nil - case "#fad165", "#ff7537", "#e6c800": + case "#fad165", "#ff7537", "#e6c800", "#fbe983", "#ffad46": return colYellow, nil } return 0, errors.New("Not found")