How jacklandrin/onlyswitch works
OnlySwitch is a macOS menu-bar utility that brings system toggles and related tools into one customizable interface. The main workflow is opening the menu-bar controls, choosing a switch or shortcut, and invoking its associated behavior; the README also documents keyboard shortcuts, widgets, an alternate Only Control appearance, and an optional desktop pet. Major branches include audio playback, system monitoring, AI-agent tools, and iOS remote control. The graph uses documented capabilities and the sampled manager, status-bar, player, pet, and remote-demo code; unsampled subsystem wiring is left out where uncertain.
Main entry points: RemoteHost.swift Remote Host · OnlySwitchListView.swift Switch List · SettingsView.swift Settings · StatusBarController.swift Status Bar
Components 23
Menu Bar Access
- Status Bar
OnlySwitch/StatusBar/StatusBarController.swift - Switch List
OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift - Only Control
OnlySwitch/Features/OnlyControl/OnlyControlView.swift - Desktop Pet
Modules/Sources/DesktopPet/DesktopPetController.swift
Switches And Items
- Shortcuts Items
OnlySwitch/Features/SwitchItem/ShortcutsItem/ShortcutsBarView.swift - Switch Manager
OnlySwitch/EverySwitch/SwitchManager.swift - Switch Implementations
OnlySwitch/EverySwitch/SwitchType++.swift - Switch Bar
OnlySwitch/Features/SwitchItem/SwitchBar/SwitchBarView.swift
Configuration
- Settings
OnlySwitch/Features/Settings/SettingsView/SettingsView.swift - List Customization
OnlySwitch/Features/Settings/Customize/CustomizeView.swift - Evolution Gallery
OnlySwitch/Features/Settings/Evolution/EvolutionGallery/EvolutionGalleryView.swift
App Tools
- Audio Playback
OnlySwitch/Player/CommonPlayer/PlayerManager.swift - System Monitor
OnlySwitch/Features/SystemMonitor/SystemMonitorStatusItemController.swift - Only Agent
Modules/Sources/OnlyAgent/AgentCommand.swift - Authenticator
Modules/Sources/Authenticator/AuthenticatorStore.swift
Remote Access
- Remote Settings
OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsView.swift - Remote Host
OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift - Command Router
OnlySwitch/Features/RemoteAccess/Commands/RemoteCommandRouter.swift - Control Catalog
OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider.swift - Remote Protocol
Modules/Sources/RemoteCore/RemoteMessage.swift - Remote Transport
Modules/Sources/RemoteTransport/RemoteConnectionIO.swift
Other components
- Mac User
- OnlyRemote Device
Connections 24
- Mac User → Status Bar: opens
- Status Bar → Switch List: shows controls
- Mac User → Switch List: selects item
- Mac User → Only Control: opens appearance
- Mac User → Desktop Pet: uses companion
- Desktop Pet → Only Control: opens controls
- Switch List → Switch Manager: gets items
- Switch Manager → Switch Implementations: registers
- Switch List → Switch Bar: presents switches
- Mac User → Shortcuts Items: runs shortcut
- Mac User → Settings: configures app
- Settings → List Customization: opens customization
- Settings → Evolution Gallery: opens gallery
- Mac User → Audio Playback: controls playback
- Mac User → System Monitor: views metrics
- Mac User → Only Agent: uses agent
- Mac User → Authenticator: uses codes
- Mac User → Remote Settings: enables remote
- OnlyRemote Device → Remote Host: connects over LAN
- Remote Host → Control Catalog: publishes controls
- Remote Host → Command Router: routes commands
- Command Router → Remote Protocol: uses messages
- Remote Host → Remote Protocol: exchanges messages
- Remote Host → Remote Transport: uses connection I/O