themepicker

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package themepicker is File > Settings > Theme: every theme in a picker, fuzzy searched by name, "dark" or "light". The highlighted theme is drawn live; Enter keeps it, Esc goes back to the theme there was. It knows the UI only through Host, which draws and saves themes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host interface {
	picker.Host
	// Current is the theme configured for the terminal's background.
	Current() string
	// ThemesDir is where the user's own themes are.
	ThemesDir() string
	// Preview draws the theme named name; "" goes back to the configured
	// one.
	Preview(name string)
	// Keep closes the picker and makes name the theme, saving it.
	Keep(name string)
}

Host is what the theme picker needs of the UI: a picker's host, and the themes.

type Picker

type Picker struct {
	*picker.Picker
	// contains filtered or unexported fields
}

Picker is the open theme picker.

func New

func New(h Host) *Picker

New returns a picker of every theme with the current one highlighted and drawn.

func (*Picker) Changed

func (tp *Picker) Changed()

func (*Picker) Key

func (tp *Picker) Key(k tea.KeyPressMsg) tea.Cmd

func (*Picker) Mouse

func (tp *Picker) Mouse(e overlay.MouseEvent) tea.Cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL