tsplay/internal/tui/styles.go
28allday 8ee58b905f Initial commit: tuistream-play (tsplay) v0.1
Terminal Jellyfin client, watch-side companion to TUISTREAM.

- LAN auto-discovery (broadcast + unicast subnet sweep)
- mpv-window video playback over JSON IPC (pause/seek/progress/resume)
- headless audio playback with in-terminal now-playing screen
- volume control with remembered level, mute
- audio auto-advance + n/p track skip through the album queue
- Omarchy-themed UI with Nerd Font (nf-md) icons
- cliamp Jellyfin provider auto-config on login
- pacman dependency-installing installer

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 12:36:49 +01:00

37 lines
1.2 KiB
Go

// Styles derived from the active Omarchy theme (or the ANSI fallback). Kept in
// one place so the login, browse and playing views share a consistent look.
package tui
import (
"github.com/charmbracelet/lipgloss"
"tuistream-play/internal/theme"
)
type styles struct {
title lipgloss.Style
accent lipgloss.Style
muted lipgloss.Style
good lipgloss.Style
bad lipgloss.Style
help lipgloss.Style
barFill lipgloss.Style
barEmpty lipgloss.Style
box lipgloss.Style
}
func newStyles(t theme.Theme) styles {
return styles{
title: lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(t.Accent)),
accent: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Accent)),
muted: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Muted)),
good: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Good)),
bad: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Bad)),
help: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Muted)),
barFill: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Accent)),
barEmpty: lipgloss.NewStyle().Foreground(lipgloss.Color(t.Muted)),
box: lipgloss.NewStyle().
Border(lipgloss.RoundedBorder()).
BorderForeground(lipgloss.Color(t.Accent)).
Padding(1, 2),
}
}