Documentation
¶
Overview ¶
Package domain defines the core domain models, constants, and shared types for the Neru application.
This package contains the fundamental building blocks that define the Neru domain, including mode definitions, action types, and other shared constants and types that are used across multiple packages in the application.
Index ¶
Constants ¶
const ( ModeNameIdle = "idle" ModeNameHints = "hints" ModeNameGrid = "grid" ModeNameScroll = "scroll" ModeNameQuadGrid = "quadgrid" )
Mode names as strings.
const ( CommandPing = "ping" CommandStart = "start" CommandStop = "stop" CommandAction = "action" CommandStatus = "status" CommandConfig = "config" CommandReloadConfig = "reload" CommandHealth = "health" CommandMetrics = "metrics" )
IPC Commands.
const ( UnknownAction = "unknown" UnknownMode = "unknown" )
Mode-related constants.
const ( BundleIDDock = "com.apple.dock" BundleIDNotificationCenter = "com.apple.notificationcenterui" )
Bundle ID constants for macOS system applications.
const ( DefaultHintCharacters = "asdfghjkl" DefaultExitKey = "escape" )
Default values.
const ( SubgridRows = 3 SubgridCols = 3 )
Grid subgrid dimensions.
const (
ShellCommandTimeout = 30 * time.Second
)
Timeout constants.
Variables ¶
This section is empty.
Functions ¶
func ActionFromString ¶
ActionFromString converts a string to its action.Type representation.
func ActionString ¶
ActionString converts an action.Type to its string representation.
func ModeString ¶
ModeString converts a Mode to its string representation.
Types ¶
type BaseManager ¶ added in v1.11.0
BaseManager provides common functionality for domain managers. It contains shared fields and methods used across different domain managers.
func (*BaseManager) CurrentInput ¶ added in v1.11.0
func (m *BaseManager) CurrentInput() string
CurrentInput returns the current input string.
func (*BaseManager) Reset ¶ added in v1.11.0
func (m *BaseManager) Reset()
Reset resets the base manager to its initial state.
func (*BaseManager) SetCurrentInput ¶ added in v1.11.0
func (m *BaseManager) SetCurrentInput(input string)
SetCurrentInput sets the current input string.
type Router ¶ added in v1.17.0
Router provides common routing functionality for mode-based key handling. It can be embedded by specific routers (grid, hint) to share common logic.
func NewRouterWithExitKeys ¶ added in v1.17.0
NewRouterWithExitKeys creates a new base router with custom exit keys.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package action defines domain models for user actions.
|
Package action defines domain models for user actions. |
|
Package element provides domain models for UI elements.
|
Package element provides domain models for UI elements. |
|
Package grid provides domain models and logic for grid-based navigation.
|
Package grid provides domain models and logic for grid-based navigation. |
|
Package hint provides hint generation algorithms for UI elements.
|
Package hint provides hint generation algorithms for UI elements. |
|
Package quadgrid provides recursive quadrant-based navigation for screen coordinates.
|
Package quadgrid provides recursive quadrant-based navigation for screen coordinates. |
|
Package state provides centralized state management for the Neru application.
|
Package state provides centralized state management for the Neru application. |