Documentation
¶
Index ¶
- Constants
- Variables
- func Center(msg string) string
- func CenterHorz(msg string) string
- func GetItemDelgate() (del list.DefaultDelegate)
- func GetTermSize() (int, int)
- func HexToEightBit(hex string) termenv.Color
- func HexToRGB(hex string) termenv.RGBColor
- func ProgramHeader() string
- func RenderModel(body, footer string) string
- func ValidHexCode(input string) error
- type LandingModel
- type Style
- func (s Style) Description() string
- func (s Style) FilterValue() string
- func (s Style) GetDirColorBlock() string
- func (s Style) SaveStyle()
- func (s *Style) SetBack(back string)
- func (s *Style) SetFiles(files string)
- func (s *Style) SetFore(fore string)
- func (s Style) Title() string
- func (s *Style) ToggleBlink()
- func (s *Style) ToggleBold()
- func (s *Style) ToggleUnder()
- type Theme
- type ThemeModel
Constants ¶
View Source
const ConstHeight = 27
View Source
const ConstWidth = 35
View Source
const HexCodePattern = "[0-9a-fA-F]{6}"
HexCodePattern will regex match any 6 digit hexcode
Variables ¶
View Source
var BlurredAreaStyle = textarea.Style{}
View Source
var DefaultTermBack lipgloss.Color
View Source
var DefaultTermFore lipgloss.Color
View Source
var EightBitMode = false
View Source
var FocusedAreaStyle = textarea.Style{}
View Source
var HelpDescStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#B2B2B2",
Dark: "#4A4A4A",
})
View Source
var HelpKeyStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#909090",
Dark: "#626262",
})
View Source
var SubtitleStyle = lipgloss.NewStyle().Italic(true).Foreground(lipgloss.Color("#888888"))
View Source
var ThemeConfigFolder = filepath.Join(UserConfig, "stylish")
View Source
var UserConfig, _ = os.UserConfigDir()
View Source
var ViewportBorder = lipgloss.NewStyle().BorderStyle(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("#4400FF")).Height(ConstHeight)
Functions ¶
func CenterHorz ¶
func GetItemDelgate ¶
func GetItemDelgate() (del list.DefaultDelegate)
func GetTermSize ¶
func HexToEightBit ¶
func ProgramHeader ¶
func ProgramHeader() string
func RenderModel ¶
func ValidHexCode ¶
Types ¶
type LandingModel ¶
type LandingModel struct { ThemeList list.Model ThemeInput textinput.Model InputActive bool DeleteActive bool // contains filtered or unexported fields }
func NewLandingModel ¶
func NewLandingModel() LandingModel
func (LandingModel) Init ¶
func (m LandingModel) Init() tea.Cmd
func (LandingModel) View ¶
func (m LandingModel) View() string
type Style ¶
type Style struct { Theme string `yaml:"theme"` Name string `yaml:"name"` Bold bool `yaml:"bold"` Under bool `yaml:"under"` Blink bool `yaml:"blink"` Fore string `yaml:"fore"` Back string `yaml:"back"` FileTypes []string `yaml:"filetypes"` }
func (Style) FilterValue ¶
func (Style) GetDirColorBlock ¶
func (*Style) ToggleBlink ¶
func (s *Style) ToggleBlink()
func (*Style) ToggleBold ¶
func (s *Style) ToggleBold()
func (*Style) ToggleUnder ¶
func (s *Style) ToggleUnder()
type Theme ¶
Theme represents a collection of Styles
func GetAllThemes ¶
func GetAllThemes() []Theme
GetAllThemes will return a slice containing all Themes
func GetTheme ¶
GetTheme will get the theme of a given name. If the provided name doesn't exist, a folder for that theme will be created.
func (Theme) Description ¶
func (Theme) DoesStyleExist ¶
func (Theme) FilterValue ¶
These functions fullfil the tea.DefaultItemValue interface
func (Theme) GenerateDirColors ¶
GenerateDirColors will convert all of a theme's styles into an output file
func (Theme) LoadStyles ¶
LoadStyles will load all of the styles for a given theme
func (*Theme) RemoveStyle ¶
RemoveStyle will remove the style with a given name from both the theme's list and from the file system
type ThemeModel ¶
type ThemeModel struct { Theme Theme StyleList list.Model NameInput textinput.Model ColorInput textinput.Model FilesInput textarea.Model // contains filtered or unexported fields }
func NewThemeModel ¶
func NewThemeModel(theme Theme) ThemeModel
func (ThemeModel) Init ¶
func (m ThemeModel) Init() tea.Cmd
func (ThemeModel) View ¶
func (m ThemeModel) View() string
Click to show internal directories.
Click to hide internal directories.