@@ -13,6 +13,7 @@ import (
1313
1414 "github.com/antonjah/ssm/internal/config"
1515
16+ catppuccin "github.com/catppuccin/go"
1617 "github.com/charmbracelet/bubbles/help"
1718 "github.com/charmbracelet/bubbles/key"
1819 "github.com/charmbracelet/bubbles/list"
@@ -22,6 +23,9 @@ import (
2223 "golang.org/x/text/language"
2324)
2425
26+ // Use Catppuccin Mocha flavor
27+ var mocha = catppuccin .Mocha
28+
2529var docStyle = lipgloss .NewStyle ().Margin (1 , 2 )
2630
2731var titleCaser = cases .Title (language .English )
@@ -70,6 +74,23 @@ type customDelegate struct {
7074
7175func newCustomDelegate () customDelegate {
7276 d := list .NewDefaultDelegate ()
77+
78+ // Apply Catppuccin Mocha colors
79+ d .Styles .SelectedTitle = d .Styles .SelectedTitle .
80+ Foreground (lipgloss .Color (mocha .Mauve ().Hex )).
81+ BorderForeground (lipgloss .Color (mocha .Mauve ().Hex ))
82+ d .Styles .SelectedDesc = d .Styles .SelectedDesc .
83+ Foreground (lipgloss .Color (mocha .Subtext0 ().Hex )).
84+ BorderForeground (lipgloss .Color (mocha .Mauve ().Hex ))
85+ d .Styles .NormalTitle = d .Styles .NormalTitle .
86+ Foreground (lipgloss .Color (mocha .Text ().Hex ))
87+ d .Styles .NormalDesc = d .Styles .NormalDesc .
88+ Foreground (lipgloss .Color (mocha .Subtext1 ().Hex ))
89+ d .Styles .DimmedTitle = d .Styles .DimmedTitle .
90+ Foreground (lipgloss .Color (mocha .Overlay0 ().Hex ))
91+ d .Styles .DimmedDesc = d .Styles .DimmedDesc .
92+ Foreground (lipgloss .Color (mocha .Overlay0 ().Hex ))
93+
7394 return customDelegate {defaultDelegate : d }
7495}
7596
@@ -168,6 +189,15 @@ func NewModel(hosts []config.Host) Model {
168189 hostList .SetFilteringEnabled (true )
169190 hostList .SetShowTitle (false )
170191
192+ // Apply Catppuccin Mocha colors to list styles
193+ hostList .Styles .Title = hostList .Styles .Title .
194+ Foreground (lipgloss .Color (mocha .Mauve ().Hex )).
195+ Bold (true )
196+ hostList .Styles .FilterPrompt = hostList .Styles .FilterPrompt .
197+ Foreground (lipgloss .Color (mocha .Mauve ().Hex ))
198+ hostList .Styles .FilterCursor = hostList .Styles .FilterCursor .
199+ Foreground (lipgloss .Color (mocha .Pink ().Hex ))
200+
171201 return Model {
172202 list : hostList ,
173203 help : help .New (),
@@ -233,8 +263,9 @@ func (m Model) View() string {
233263 Margin (1 , 2 ).
234264 Padding (1 , 2 ).
235265 Border (lipgloss .RoundedBorder ()).
236- BorderForeground (lipgloss .Color ("5" )).
237- Foreground (lipgloss .Color ("#FFFFFF" )).
266+ BorderForeground (lipgloss .Color (mocha .Mauve ().Hex )).
267+ Foreground (lipgloss .Color (mocha .Text ().Hex )).
268+ Background (lipgloss .Color (mocha .Base ().Hex )).
238269 Width (60 ) // Fixed width for better centering
239270
240271 styledPopup := popupStyle .Render (popupContent )
0 commit comments