@@ -82,41 +82,30 @@ func Title(title string, width int) string {
8282}
8383
8484type StatusOpts struct {
85− Icon string
86− IconColor color.Color
87− NoIcon bool // If true, no icon will be displayed
85+ Icon string // if empty no icon will be shown
8886 Title string
8987 TitleColor color.Color
9088 Description string
9189 DescriptionColor color.Color
92− ExtraContent string // Additional content to append after the description
90+ ExtraContent string // additional content to append after the description
9391}
9492
95−func Status(ops StatusOpts, width int) string {
93+func Status(opts StatusOpts, width int) string {
9694 t := styles.CurrentTheme()
97− icon := "●"
98− iconColor := t.Success
99− if ops.Icon != "" {
100− icon = ops.Icon
101− } else if ops.NoIcon {
102− icon = ""
103− }
104− if ops.IconColor != nil {
105− iconColor = ops.IconColor
106− }
107− title := ops.Title
95+ icon := opts.Icon
96+ title := opts.Title
10897 titleColor := t.FgMuted
109− if ops.TitleColor != nil {
110− titleColor = ops.TitleColor
98+ if opts.TitleColor != nil {
99+ titleColor = opts.TitleColor
111100 }
112− description := ops.Description
101+ description := opts.Description
113102 descriptionColor := t.FgSubtle
114− if ops.DescriptionColor != nil {
115− descriptionColor = ops.DescriptionColor
103+ if opts.DescriptionColor != nil {
104+ descriptionColor = opts.DescriptionColor
116105 }
117106 title = t.S().Base.Foreground(titleColor).Render(title)
118107 if description != "" {
119− extraContentWidth := lipgloss.Width(ops.ExtraContent)
108+ extraContentWidth := lipgloss.Width(opts.ExtraContent)
120109 if extraContentWidth > 0 {
121110 extraContentWidth += 1
122111 }
@@ -126,11 +115,11 @@ func Status(ops StatusOpts, width int) string {
126115
127116 content := []string{}
128117 if icon != "" {
129− content = append(content, t.S().Base.Foreground(iconColor).Render(icon))
118+ content = append(content, icon)
130119 }
131120 content = append(content, title, description)
132− if ops.ExtraContent != "" {
133− content = append(content, ops.ExtraContent)
121+ if opts.ExtraContent != "" {
122+ content = append(content, opts.ExtraContent)
134123 }
135124
136125 return strings.Join(content, " ")