How frostymur/aerofi works
Aerofi is a native macOS launcher and script engine. The main workflow runs from startup through launcher state: configured sources become searchable targets, queries rank them, and selection dispatches an action or script; interactive Rofi scripts exchange events and updated rows with the launcher. Separate capabilities cover themes and declarative widgets, Markdown output, plugins, global hotkeys, background refresh, and native window handling. Edges use README statements or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: state.rs Launcher controller · main.rs Application startup · render.rs Launcher rendering · scanner.rs Source scanner
Components 24
Launcher workflow
- Application startup
src/main.rs - Configuration
src/core/config.rs - Source scanner
src/core/scanner.rs - Launcher targets
src/core/item.rs - Matching and ranking
src/core/search.rs - Frecency history
src/core/history.rs - Launcher controller
src/ui/launcher/state.rs
Scripts and extensions
- Script execution
src/core/executor.rs - Rofi IPC protocol
src/core/rofi_protocol.rs - Interactive script sessions
src/core/rofi_session.rs - Native plugins
src/core/plugin_manager.rs - Plugin ABI
aerofi-plugin-api/src/lib.rs - Inline refresh scheduler
src/core/scheduler.rs - Filesystem watcher
src/core/fs_watcher.rs
UI and themes
- Launcher rendering
src/ui/launcher/render.rs - Window management
src/ui/window.rs - Theme loader
src/core/theme.rs - Declarative widgets
src/core/widget.rs - Markdown rendering model
src/core/markdown.rs
macOS services
- AppKit integration
src/sys/appkit.rs - Global hotkeys
src/sys/carbon.rs
Other components
- macOS user
- User script
- macOS
Connections 30
- macOS user → Application startup: launches
- Application startup → Configuration: loads
src/main.rs - Application startup → Source scanner: starts
src/main.rs - Source scanner → Configuration: reads
src/core/scanner.rs - Source scanner → Launcher targets: creates
src/core/scanner.rs - Application startup → Inline refresh scheduler: starts
src/main.rs - Application startup → Filesystem watcher: starts
src/main.rs - macOS user → Launcher controller: queries
- Launcher controller → Matching and ranking: filters
src/ui/launcher/state.rs - Matching and ranking → Launcher targets: ranks
src/core/search.rs - Matching and ranking → Frecency history: reads
src/core/search.rs - Launcher controller → Frecency history: records
src/ui/launcher/state.rs - Launcher controller → Script execution: dispatches
src/ui/launcher/state.rs - Launcher controller → Launcher rendering: renders
src/ui/launcher/render.rs - Launcher rendering → Theme loader: uses
src/ui/launcher/render.rs - Launcher rendering → Markdown rendering model: renders
src/ui/launcher/render.rs - Launcher rendering → Declarative widgets: renders
- Launcher controller → Native plugins: queries
src/ui/launcher/state.rs - Native plugins → Plugin ABI: loads ABI
src/core/plugin_manager.rs - Launcher controller → Interactive script sessions: manages
src/ui/launcher/sessions.rs - Interactive script sessions → Rofi IPC protocol: exchanges events
src/core/rofi_session.rs - Interactive script sessions → Script execution: starts scripts
src/core/rofi_session.rs - User script → Rofi IPC protocol: streams IPC
- Inline refresh scheduler → Script execution: runs scripts
src/core/scheduler.rs - Filesystem watcher → Source scanner: rescans
src/core/fs_watcher.rs - Window management → AppKit integration: controls window
src/ui/window.rs - Global hotkeys → Launcher targets: binds targets
src/sys/carbon.rs - Global hotkeys → Window management: triggers launcher
- AppKit integration → macOS: calls APIs
- macOS user → Global hotkeys: uses hotkeys