Skip to content

Commit

Permalink
refactor the huh theme setting a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Oct 25, 2024
1 parent a7dff6f commit e38574d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmd/humanlog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ var (
defaultBaseSiteAddr = "https://humanlog.io"
hideUnreleasedFeatures = ""

huhTheme = huh.ThemeCatppuccin()
huhTheme = func() *huh.Theme {
base := huh.ThemeCatppuccin()
base.Focused.FocusedButton = base.Focused.FocusedButton.Bold(true).Underline(true)
base.Focused.BlurredButton = base.Focused.BlurredButton.Bold(false).Underline(false).Strikethrough(true)
base.Blurred.FocusedButton = base.Focused.FocusedButton.Bold(true).Underline(true)
base.Blurred.BlurredButton = base.Focused.BlurredButton.Bold(false).Underline(false).Strikethrough(true)
return base
}()
)

func fatalf(c *cli.Context, format string, args ...interface{}) {
Expand All @@ -82,10 +89,6 @@ func fatalf(c *cli.Context, format string, args ...interface{}) {
}

func main() {
huhTheme.Focused.FocusedButton = huhTheme.Focused.FocusedButton.Bold(true).Underline(true)
huhTheme.Focused.BlurredButton = huhTheme.Focused.BlurredButton.Bold(false).Underline(false).Strikethrough(true)
huhTheme.Blurred.FocusedButton = huhTheme.Focused.FocusedButton.Bold(true).Underline(true)
huhTheme.Blurred.BlurredButton = huhTheme.Focused.BlurredButton.Bold(false).Underline(false).Strikethrough(true)
app := newApp()

prefix := rgbterm.FgString(app.Name+"> ", 99, 99, 99)
Expand Down

0 comments on commit e38574d

Please sign in to comment.