How tim4c/btopdesktop works
Btop Desktop hosts the bundled btop monitor in a native macOS desktop panel. The main workflow runs from the menu-bar app through panel and terminal setup to btop output rendered by the terminal view; Settings changes presentation, themes, or desktop-icon visibility. The graph preserves the README’s documented interaction, appearance, theme, and Mission Control capabilities. Some runtime and UI links are based on the SOURCE INDEX rather than complete excerpts, so unsampled connections are omitted.
Main entry points: AppDelegate.swift App delegate · DesktopWindowController.swift Panel controller · TerminalRuntime.swift Terminal runtime · TerminalViewController.swift Terminal controller
Components 21
App and panel
- App delegate
Sources/BtopDesktop/App/AppDelegate.swift - Panel controller
Sources/BtopDesktop/App/DesktopWindowController.swift - Desktop panel
Sources/BtopDesktop/App/DesktopPanel.swift - Preferences
Sources/BtopDesktop/App/AppPreferences.swift - Panel defaults
Sources/BtopDesktop/App/PanelPreferences.swift - Appearance state
Sources/BtopDesktop/App/DesktopAppearanceState.swift
Terminal runtime
- Terminal runtime
Sources/BtopDesktop/Infrastructure/TerminalRuntime.swift - Process bridge
Sources/BtopDesktop/Infrastructure/NativeProcessBridge.swift - PTY connection
Sources/BtopDesktop/Infrastructure/NativePTYConnection.swift - Terminal controller
Sources/BtopDesktop/UI/TerminalViewController.swift - Native terminal view
Sources/BtopDesktop/UI/NativeTerminalView.swift - Escape filtering
Sources/BtopDesktop/App/TerminalEscapeFilter.swift
Settings and themes
- Settings controller
Sources/BtopDesktop/UI/SettingsWindowController.swift - Settings interface
Sources/BtopDesktop/UI/SettingsView.swift - Btop configuration
Sources/BtopDesktop/Infrastructure/BtopConfigurationStore.swift - Theme store
Sources/BtopDesktop/Infrastructure/BtopThemeStore.swift - Theme catalog
Sources/BtopDesktop/Infrastructure/BtopThemeCatalog.swift
Desktop integration
- Icon visibility
Sources/BtopDesktop/Infrastructure/DesktopIconVisibilityController.swift - Overview monitor
Sources/BtopDesktop/Infrastructure/DesktopOverviewMonitor.swift - Overview state
Sources/BtopDesktop/Infrastructure/DesktopOverviewState.swift
Other components
- Mac user
Connections 21
- Mac user → App delegate: opens app
README.md - App delegate → Panel controller: creates panel
Sources/BtopDesktop/App/AppDelegate.swift - App delegate → Terminal runtime: starts runtime
Sources/BtopDesktop/App/AppDelegate.swift - App delegate → Preferences: loads settings
Sources/BtopDesktop/App/AppDelegate.swift - Panel controller → Terminal controller: configures terminal
Sources/BtopDesktop/App/DesktopWindowController.swift - Panel controller → Desktop panel: configures panel
Sources/BtopDesktop/App/DesktopWindowController.swift - Panel controller → Appearance state: updates appearance
Sources/BtopDesktop/App/DesktopWindowController.swift - Preferences → Panel defaults: uses defaults
Sources/BtopDesktop/App/AppPreferences.swift - Terminal controller → Terminal runtime: sends input and resize
Sources/BtopDesktop/UI/TerminalViewController.swift - Terminal controller → Native terminal view: renders terminal
Sources/BtopDesktop/UI/TerminalViewController.swift - Desktop panel → Escape filtering: filters Escape
Sources/BtopDesktop/App/DesktopPanel.swift - Terminal runtime → Process bridge: manages process
Sources/BtopDesktop/Infrastructure/TerminalRuntime.swift - Terminal runtime → Btop configuration: prepares configuration
Sources/BtopDesktop/Infrastructure/TerminalRuntime.swift - Terminal runtime → Theme store: validates theme
Sources/BtopDesktop/Infrastructure/TerminalRuntime.swift - Settings controller → Settings interface: handles events
Sources/BtopDesktop/UI/SettingsWindowController.swift - Settings interface → Panel defaults: edits presentation
Sources/BtopDesktop/UI/SettingsView.swift - Theme store → Btop configuration: uses configuration
Sources/BtopDesktop/Infrastructure/BtopThemeStore.swift - Theme catalog → Theme store: lists themes
Sources/BtopDesktop/Infrastructure/BtopThemeCatalog.swift - App delegate → Icon visibility: controls visibility
Sources/BtopDesktop/App/AppDelegate.swift - Panel controller → Overview monitor: tracks overview
Sources/BtopDesktop/App/DesktopWindowController.swift - Overview monitor → Overview state: updates state
Sources/BtopDesktop/Infrastructure/DesktopOverviewMonitor.swift