summaryrefslogtreecommitdiff
path: root/internal/switcher/switcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/switcher/switcher.go')
-rw-r--r--internal/switcher/switcher.go22
1 files changed, 19 insertions, 3 deletions
diff --git a/internal/switcher/switcher.go b/internal/switcher/switcher.go
index 74f0d6b..f368224 100644
--- a/internal/switcher/switcher.go
+++ b/internal/switcher/switcher.go
@@ -3,6 +3,7 @@ package switcher
import (
"fmt"
"log/slog"
+ "strings"
"github.com/ChausseBenjamin/termpicker/internal/colors"
"github.com/ChausseBenjamin/termpicker/internal/notices"
@@ -92,14 +93,29 @@ func (m Model) Init() tea.Cmd {
}
func (m Model) View() string {
- tabs := "|"
+ norm := lipgloss.NewStyle().Faint(true)
+ bright := lipgloss.NewStyle().Faint(false)
+
+ delims := [3]string{"[ ", " | ", "]"}
+ for i, d := range delims {
+ delims[i] = bright.Render(d)
+ }
+
+ var sections []string
for i, p := range m.pickers {
if i == m.active {
- tabs += fmt.Sprintf(">%s<|", p.Title())
+ sections = append(
+ sections,
+ bright.
+ Underline(true).
+ Bold(true).
+ Render(p.Title()),
+ )
} else {
- tabs += fmt.Sprintf(" %s |", p.Title())
+ sections = append(sections, norm.Render(p.Title()))
}
}
+ tabs := "[ " + strings.Join(sections, " | ") + " ]"
pickerView := m.pickers[m.active].View()
boxStyle := lipgloss.NewStyle().Border(lipgloss.RoundedBorder(), true, true, false, true)