Documentation
¶
Index ¶
- func GetEnvKey(name string) string
- func GetEnvPair(name, value string) string
- func Launch(name string, config Config)
- func Register(name string, panel PanelHandler)
- func RegisterFunc(name string, panel PanelFunc)
- type Config
- type Edge
- type FocusPolicy
- type Kitty
- func (k *Kitty) Close() error
- func (k *Kitty) Command(cmd string, payload any) (map[string]any, error)
- func (k *Kitty) Dispatch(cmd string, payload any) error
- func (k *Kitty) Hide() error
- func (k *Kitty) Move(x, y int) error
- func (k *Kitty) Resize(columns, lines int) error
- func (k *Kitty) SetFontSize(size int) error
- func (k *Kitty) SetOpacity(opacity float64) error
- func (k *Kitty) Show() error
- func (k *Kitty) ToggleVisibility() error
- type Layer
- type Margins
- type NotificationWriter
- type Panel
- func BackgroundPanel(name string) *Panel
- func BottomPanel(name string, lines int) *Panel
- func FloatingPanel(name string, lines, columns int) *Panel
- func NewPanel(name string, config Config) *Panel
- func NewPanelContext(ctx context.Context, name string, config Config) *Panel
- func TopPanel(name string, lines int) *Panel
- func (p *Panel) Kill() error
- func (p *Panel) ReadOutput() ([]byte, error)
- func (p *Panel) ReadWriter() io.ReadWriter
- func (p *Panel) Reader() io.Reader
- func (p *Panel) Run() error
- func (p *Panel) Start() error
- func (p *Panel) Stop() error
- func (p *Panel) Wait() error
- func (p *Panel) Writer() io.Writer
- type PanelFunc
- type PanelHandler
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvPair ¶
Returns "{key}={value}".
key is the returned value from GetEnvKey function with name as argument
func Register ¶
func Register(name string, panel PanelHandler)
func RegisterFunc ¶
Types ¶
type Config ¶
type Config struct { Position Vector Size Vector Layer Layer FocusPolicy FocusPolicy Edge Edge OutputName string Class string HideOnFocusLoss bool StartAsHidden bool SingleInstance bool InstanceGroup string ConfigFile string // appended to the last, can be used to add unspecified options Overrides map[string]string // Easier way to add -o options KittyOverrides []string // kitty command to be invoked, default: kitty // // one usecase: when multiple versions of kitty are installed and maintained using symlinks KittyCmd string }
type FocusPolicy ¶
type FocusPolicy int
const ( FocusExclusive FocusPolicy = iota + 1 // exclusive FocusNotAllowed // not-allowed FocusOnDemand // on-demand )
func (FocusPolicy) String ¶
func (i FocusPolicy) String() string
type Kitty ¶
type Kitty struct {
// contains filtered or unexported fields
}
func (*Kitty) Dispatch ¶
For dispatching commands only, no response is assumed. For $(kitty --version) > v0.42.0
func (*Kitty) SetFontSize ¶
func (*Kitty) SetOpacity ¶
func (*Kitty) ToggleVisibility ¶
type NotificationWriter ¶
type NotificationWriter struct{}
type Panel ¶
type Panel struct { // pointer to underlying exec.Cmd, can be used to set Env // or directly interface with exec.Cmd Cmd *exec.Cmd // contains filtered or unexported fields }
func BackgroundPanel ¶
BackgroundPanel creates a background/wallpaper panel
func BottomPanel ¶
BottomPanel creates a bottom-edge panel
func FloatingPanel ¶
FloatingPanel creates a centered floating panel
func (*Panel) ReadOutput ¶
ReadOutput reads all available output from the panel Returns empty slice if no shared memory reader is available
func (*Panel) ReadWriter ¶
func (p *Panel) ReadWriter() io.ReadWriter
type PanelHandler ¶
type PanelHandler interface {
Run(k *Kitty, rw io.ReadWriter) int
}
Click to show internal directories.
Click to hide internal directories.