Documentation
¶
Index ¶
- Variables
- func CustomFilter(term string, targets []string) []list.Rank
- func GetWslHostName() string
- func IsWSL() bool
- func IsWayland() bool
- func Render(items []list.Item, cmds Commands, errors []string, cfg *config.Config) error
- type Commands
- func (c Commands) Add(url string) error
- func (c Commands) CleanFeeds() error
- func (c Commands) GetAllFeeds() ([]store.Item, error)
- func (c Commands) GetGlamourisedArticle(ID int) (string, error)
- func (c Commands) List() error
- func (c Commands) OpenInBrowser(url string) error
- func (c Commands) OpenLink(url string) tea.Cmd
- func (c Commands) Refresh() error
- func (c Commands) ShowConfig() error
- func (c Commands) TUI() error
- type ErrorItem
- type FetchResultError
- type Filterer
- type ListKeyMapT
- type TUIItem
- type ViewportKeyMapT
Constants ¶
This section is empty.
Variables ¶
var ListKeyMap = ListKeyMapT{ Open: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "open"), ), Favourite: key.NewBinding( key.WithKeys("f"), key.WithHelp("f", "favourite"), ), ToggleFavourites: key.NewBinding( key.WithKeys("F"), key.WithHelp("F", "toggle show favourite"), ), Read: key.NewBinding( key.WithKeys("m"), key.WithHelp("m", "mark read"), ), ToggleReads: key.NewBinding( key.WithKeys("M"), key.WithHelp("M", "toggle show read"), ), MarkAllRead: key.NewBinding( key.WithKeys("alt+m"), key.WithHelp("alt+m", "mark all read"), ), Refresh: key.NewBinding( key.WithKeys("r"), key.WithHelp("r", "refresh"), ), OpenInBrowser: key.NewBinding( key.WithKeys("o"), key.WithHelp("o", "open in browser"), ), Sort: key.NewBinding( key.WithKeys("s"), key.WithHelp("s", "sort"), ), EditConfig: key.NewBinding( key.WithKeys("E"), key.WithHelp("E", "edit config in $EDITOR"), ), Suspend: key.NewBinding( key.WithKeys("ctrl+z"), key.WithHelp("ctrl+z", "suspend"), ), // contains filtered or unexported fields }
ListKeyMap shows either (o)verrides or new keybinds
var ViewportKeyMap = ViewportKeyMapT{ Next: key.NewBinding( key.WithKeys("l", "right"), key.WithHelp("l/→", "next"), ), Prev: key.NewBinding( key.WithKeys("h", "left"), key.WithHelp("h/←", "prev"), ), Quit: key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "quit"), ), Escape: key.NewBinding( key.WithKeys("esc", "q"), key.WithHelp("q/esc", "escape"), ), Suspend: key.NewBinding( key.WithKeys("ctrl+z"), key.WithHelp("ctrl+z", "suspend"), ), OpenInBrowser: key.NewBinding( key.WithKeys("o"), key.WithHelp("o", "open in browser"), ), Favourite: key.NewBinding( key.WithKeys("f"), key.WithHelp("f", "favourite"), ), Read: key.NewBinding( key.WithKeys("m"), key.WithHelp("m", "mark read"), ), GotoStart: key.NewBinding( key.WithKeys("g", "home"), key.WithHelp("g", "top"), ), GotoEnd: key.NewBinding( key.WithKeys("G", "end"), key.WithHelp("G", "bottom"), ), ShowFullHelp: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "more"), ), CloseFullHelp: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "close help"), ), }
ViewportKeyMapT shows *all* keybinds, pulling from viewport.DefaultKeyMap()
Functions ¶
func GetWslHostName ¶
func GetWslHostName() string
Gets the subsystem host ip If the CLI is running under WSL the localhost url will not work so this function should return the real ip that we should redirect to
Types ¶
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
func (Commands) CleanFeeds ¶
func (Commands) GetGlamourisedArticle ¶
func (Commands) OpenInBrowser ¶
func (Commands) ShowConfig ¶ added in v2.6.2
type FetchResultError ¶
type FetchResultError struct {
// contains filtered or unexported fields
}
type Filterer ¶ added in v2.2.0
Struct to aid in filtering items into ranks for BubbleTea
func NewFilterer ¶ added in v2.2.0
func (*Filterer) ExtractFiltersFor ¶ added in v2.2.0
Extracts `tag:.*` from the stored f.Term.Title
type ListKeyMapT ¶ added in v2.2.2
type ListKeyMapT struct { Open key.Binding Read key.Binding Favourite key.Binding ToggleReads key.Binding MarkAllRead key.Binding ToggleFavourites key.Binding Refresh key.Binding OpenInBrowser key.Binding Sort key.Binding EditConfig key.Binding Suspend key.Binding // contains filtered or unexported fields }
ListKeyMapT shows either (o)verrides or new keybinds
func (ListKeyMapT) FullHelp ¶ added in v2.2.2
func (k ListKeyMapT) FullHelp() []key.Binding
This shows *additional* (or overridden) keybinds alongside built-ins, which *must* take []key.Binding unfortunately.
func (ListKeyMapT) SetOverrides ¶ added in v2.2.2
func (k ListKeyMapT) SetOverrides(l *list.Model)
func (ListKeyMapT) ShortHelp ¶ added in v2.2.2
func (k ListKeyMapT) ShortHelp() []key.Binding
This shows *additional* (or overridden) keybinds alongside built-ins
type ViewportKeyMapT ¶ added in v2.2.2
type ViewportKeyMapT struct { Quit key.Binding Escape key.Binding OpenInBrowser key.Binding Favourite key.Binding Read key.Binding GotoStart key.Binding GotoEnd key.Binding Next key.Binding Prev key.Binding ShowFullHelp key.Binding CloseFullHelp key.Binding Suspend key.Binding }
ViewportKeyMapT shows *all* keybinds, pulling from viewport.DefaultKeyMap()
func (ViewportKeyMapT) FullHelp ¶ added in v2.2.2
func (k ViewportKeyMapT) FullHelp() [][]key.Binding
This show *all* keybinds, as bubbles/viewport doesn't provide a help function
func (ViewportKeyMapT) ShortHelp ¶ added in v2.2.2
func (k ViewportKeyMapT) ShortHelp() []key.Binding
This show *all* keybinds, as bubbles/viewport doesn't provide a help function