models

package
v0.0.0-...-9d9a70f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	Prompt      string
	CursorPos   int
	NameToggled bool
	SourceFiles []*SourceFile
}

func NewList

func NewList(prompt string) *List

func (*List) AddSourceToList

func (l *List) AddSourceToList(sourceFile SourceFile) *List

func (*List) Display

func (l *List) Display() (SourceFilePointerArray, bool)

func (*List) SetSources

func (l *List) SetSources(sfs []*SourceFile) *List

type SourceFile

type SourceFile struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Selected bool   `json:"selected"`
	Priority string `json:"priority"`
}

func GetJsonSources

func GetJsonSources() []SourceFile

type SourceFilePointerArray

type SourceFilePointerArray []*SourceFile

func MatchSources

func MatchSources(jsonSources []SourceFile, hyprSources []string) SourceFilePointerArray

func (*SourceFilePointerArray) SaveToHyprland

func (s *SourceFilePointerArray) SaveToHyprland()

func (*SourceFilePointerArray) SaveToJson

func (s *SourceFilePointerArray) SaveToJson()

Jump to

Keyboard shortcuts

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