Documentation
¶
Overview ¶
Package settings implements the settings overlay panel for grut. It displays a navigable list of configurable options (preview position, theme, double-click actions) and emits messages when the user changes a value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Panel ¶
Panel is the settings overlay. It implements panels.Panel.
func New ¶
func New(currentPos layout.PreviewPosition, currentTheme string, themeNames []string, actionsCfg config.ActionsConfig) *Panel
New creates a new settings overlay panel.
func (*Panel) Init ¶
--------------------------------------------------------------------------- panels.Panel interface --------------------------------------------------------------------------- Init implements panels.Panel.
func (*Panel) KeyBindings ¶
func (p *Panel) KeyBindings() []panels.KeyBinding
KeyBindings implements panels.Panel.
type ResetActionPromptsMsg ¶
type ResetActionPromptsMsg struct{}
ResetActionPromptsMsg is emitted when the user resets all action confirmations.
type SetDoubleClickActionMsg ¶
SetDoubleClickActionMsg is emitted when the user changes a double-click action.
type SetPreviewPositionMsg ¶
type SetPreviewPositionMsg struct {
Position layout.PreviewPosition
}
SetPreviewPositionMsg is emitted when the user selects a preview position. The root model handles this by calling engine.SetPreviewPosition.
type SetRightClickActionMsg ¶
SetRightClickActionMsg is emitted when the user changes a right-click action.
type SetThemeMsg ¶
type SetThemeMsg struct {
Name string
}
SetThemeMsg is emitted when the user selects a theme. The root model handles this by loading and applying the new theme.
type ToggleSettingsMsg ¶
type ToggleSettingsMsg struct{}
ToggleSettingsMsg requests showing or hiding the settings overlay.