How muescha/dot_hammerspoon works
Main Components
a. Core Components:
• Hammerspoon Runtime Environment
• Lua Script Engine
• System Integration Layer
b. Project Structure Components:
• Functions Module
• Helpers Module
• Spoons (Plugin System)
• Configuration Layer
┌─────────────────────────────────────────────────────────┐
• macOS System Layer │
• ┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Hammerspoon Runtime Engine │
• ┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Core Components │
• ┬───────────────────┬───────────────────┤
• Window Manager│ Event Handlers │ System Controls │
• ┴───────────────────┴───────────────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Functional Modules │
• ┬──────────────┬──────────────┬──────────┤
• WindowPlacer │AudioSwitcher │PlayerControl │ Others │
• ┴──────────────┴──────────────┴──────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Helper Utilities │
• ┬──────────────┬──────────────┬──────────┤
• Debug Tools │ Extensions │ HotkeyBind │ Utilities│
• ┴──────────────┴──────────────┴──────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Spoons (Plugins) │
• ┘
Component Relationships
• Data flow between components
• Dependencies between modules
• Event propagation paths
• System integration points
Documentation Elements
• Component types
• Major subsystems
Implementation Details
• The modular structure of Functions/
• The helper utility system in Helpers/
• The plugin architecture using Spoons/
• The configuration system (init.lua)
Key Features to Emphasize
• Window management system
• Media player controls
• Audio device switching
• Hotkey management
• Debug and development tools
• Nested components
• Clear connection lines
• Text annotations
• Export to common formats (PNG, SVG)