summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/styles
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-03-23 19:19:08 +0100
committerKujtim Hoxha <[email protected]>2025-03-23 19:19:08 +0100
commit8daa6e774a6e02698c90392e7b2008542f789594 (patch)
tree8053fc1a4de87fc8dc3fd6e776577b0221c02ac5 /internal/tui/styles
parent796bbf4d66c0fc70e750c7f582019cb9a7298e59 (diff)
downloadopencode-8daa6e774a6e02698c90392e7b2008542f789594.tar.gz
opencode-8daa6e774a6e02698c90392e7b2008542f789594.zip
add initial stuff
Diffstat (limited to 'internal/tui/styles')
-rw-r--r--internal/tui/styles/huh.go46
-rw-r--r--internal/tui/styles/styles.go3
2 files changed, 49 insertions, 0 deletions
diff --git a/internal/tui/styles/huh.go b/internal/tui/styles/huh.go
new file mode 100644
index 000000000..d0e872758
--- /dev/null
+++ b/internal/tui/styles/huh.go
@@ -0,0 +1,46 @@
+package styles
+
+import (
+ "github.com/charmbracelet/huh"
+ "github.com/charmbracelet/lipgloss"
+)
+
+func HuhTheme() *huh.Theme {
+ t := huh.ThemeBase()
+
+ t.Focused.Base = t.Focused.Base.BorderStyle(lipgloss.HiddenBorder())
+ t.Focused.Title = t.Focused.Title.Foreground(Text)
+ t.Focused.NoteTitle = t.Focused.NoteTitle.Foreground(Text)
+ t.Focused.Directory = t.Focused.Directory.Foreground(Text)
+ t.Focused.Description = t.Focused.Description.Foreground(SubText0)
+ t.Focused.ErrorIndicator = t.Focused.ErrorIndicator.Foreground(Red)
+ t.Focused.ErrorMessage = t.Focused.ErrorMessage.Foreground(Red)
+ t.Focused.SelectSelector = t.Focused.SelectSelector.Foreground(Blue)
+ t.Focused.NextIndicator = t.Focused.NextIndicator.Foreground(Blue)
+ t.Focused.PrevIndicator = t.Focused.PrevIndicator.Foreground(Blue)
+ t.Focused.Option = t.Focused.Option.Foreground(Text)
+ t.Focused.MultiSelectSelector = t.Focused.MultiSelectSelector.Foreground(Blue)
+ t.Focused.SelectedOption = t.Focused.SelectedOption.Foreground(Green)
+ t.Focused.SelectedPrefix = t.Focused.SelectedPrefix.Foreground(Green)
+ t.Focused.UnselectedPrefix = t.Focused.UnselectedPrefix.Foreground(Text)
+ t.Focused.UnselectedOption = t.Focused.UnselectedOption.Foreground(Text)
+ t.Focused.FocusedButton = t.Focused.FocusedButton.Foreground(Base).Background(Blue)
+ t.Focused.BlurredButton = t.Focused.BlurredButton.Foreground(Text).Background(Base)
+
+ t.Focused.TextInput.Cursor = t.Focused.TextInput.Cursor.Foreground(Teal)
+ t.Focused.TextInput.Placeholder = t.Focused.TextInput.Placeholder.Foreground(Overlay0)
+ t.Focused.TextInput.Prompt = t.Focused.TextInput.Prompt.Foreground(Blue)
+
+ t.Blurred = t.Focused
+ t.Blurred.Base = t.Blurred.Base.BorderStyle(lipgloss.HiddenBorder())
+
+ t.Help.Ellipsis = t.Help.Ellipsis.Foreground(SubText0)
+ t.Help.ShortKey = t.Help.ShortKey.Foreground(SubText0)
+ t.Help.ShortDesc = t.Help.ShortDesc.Foreground(Ovelay1)
+ t.Help.ShortSeparator = t.Help.ShortSeparator.Foreground(SubText0)
+ t.Help.FullKey = t.Help.FullKey.Foreground(SubText0)
+ t.Help.FullDesc = t.Help.FullDesc.Foreground(Ovelay1)
+ t.Help.FullSeparator = t.Help.FullSeparator.Foreground(SubText0)
+
+ return t
+}
diff --git a/internal/tui/styles/styles.go b/internal/tui/styles/styles.go
index 457c555d0..807521d6f 100644
--- a/internal/tui/styles/styles.go
+++ b/internal/tui/styles/styles.go
@@ -122,4 +122,7 @@ var (
Primary = Blue
Secondary = Mauve
+
+ Warning = Peach
+ Error = Red
)