Documentation
¶
Overview ¶
Package statusbar renders the persistent top bar for the Tero app.
Index ¶
- Constants
- type Model
- func (m *Model) CloseDrawer()
- func (m *Model) DrawerView(width, height int) string
- func (m *Model) HandleEsc() bool
- func (m *Model) HandleKeyPress(msg tea.KeyPressMsg) tea.Cmd
- func (m *Model) Height() int
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsDrawerOpen() bool
- func (m *Model) NextTab()
- func (m *Model) SetContextPercent(percent int)
- func (m *Model) SetDB(db sqlite.DB) tea.Cmd
- func (m *Model) SetTitle(title string)
- func (m *Model) SetWidth(width int)
- func (m *Model) ShortHelp() []key.Binding
- func (m *Model) ToggleDrawer()
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
Constants ¶
const ( TabPII = 0 TabWaste = 1 TabServices = 2 TabSync = 3 )
Tab indices for the drawer.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model renders the app status bar.
func (*Model) DrawerView ¶
DrawerView renders the drawer overlay.
func (*Model) HandleEsc ¶ added in v1.15.0
HandleEsc lets the active tab consume an esc press before the drawer closes. Returns true if the tab consumed the event (e.g. back from detail view).
func (*Model) HandleKeyPress ¶ added in v1.15.0
func (m *Model) HandleKeyPress(msg tea.KeyPressMsg) tea.Cmd
HandleKeyPress forwards key events to the active tab's key handler.
func (*Model) IsDrawerOpen ¶
IsDrawerOpen returns whether the drawer is open.
func (*Model) SetContextPercent ¶
SetContextPercent sets the context window usage percentage.
func (*Model) ShortHelp ¶
ShortHelp returns keybindings shown in the keybar when the drawer is open.
func (*Model) ToggleDrawer ¶
func (m *Model) ToggleDrawer()
ToggleDrawer toggles the drawer open/closed. Opening is suppressed until at least one tab has data.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package pii renders the PII leakage indicator in the status bar.
|
Package pii renders the PII leakage indicator in the status bar. |
|
Package services renders the services health indicator in the status bar.
|
Package services renders the services health indicator in the status bar. |
|
Package syncstatus renders sync connection status.
|
Package syncstatus renders sync connection status. |
|
Package waste renders the waste indicator in the status bar.
|
Package waste renders the waste indicator in the status bar. |