How muhammadsaim/twenty works
TwenTy is a tray-resident desktop reminder: the app loads preferences, starts a timer, and presents synchronized break overlays when work time expires or the user requests a break. Tray and settings controls also pause/resume, skip, tune durations and sound, and configure start-on-login. The graph reflects sampled calls and README-documented capabilities; platform-specific autostart backends are shown as a documented branch, with unsampled implementation details not inferred.
Main entry points: app.py App startup · engine_controller.py Qt timer bridge · settings_dialog.py Settings window · overlay_manager.py Overlay manager
Components 19
Application
- App startup
src/twenty/app.py
Break Timing
- Timer state machine
src/twenty/core/engine.py - Timer event types
src/twenty/core/states.py - Qt timer bridge
src/twenty/ui/engine_controller.py
Desktop UI
- System tray
src/twenty/ui/tray.py - Overlay manager
src/twenty/ui/overlay/overlay_manager.py - Break overlay
src/twenty/ui/overlay/overlay_window.py - Countdown display
src/twenty/ui/overlay/countdown_widget.py - Settings window
src/twenty/ui/settings_window/settings_dialog.py - Shared visual theme
src/twenty/ui/theme/palette.py
Settings
- Settings controller
src/twenty/ui/settings_controller.py - Settings persistence
src/twenty/config/store.py - Settings model
src/twenty/config/models.py
Platform Services
- Break chime
src/twenty/services/sound.py - Autostart interface
src/twenty/platform/autostart.py - Linux autostart
src/twenty/platform/autostart_linux.py - macOS autostart
src/twenty/platform/autostart_macos.py - Windows autostart
src/twenty/platform/autostart_windows.py
Other components
- Desktop user
Connections 29
- Desktop user → System tray: uses
README.md - App startup → Settings persistence: loads settings
src/twenty/app.py - App startup → Qt timer bridge: starts timer
src/twenty/app.py - App startup → Overlay manager: creates
src/twenty/app.py - App startup → Break chime: creates
src/twenty/app.py - App startup → System tray: creates
src/twenty/app.py - App startup → Settings controller: creates
src/twenty/app.py - Qt timer bridge → Timer state machine: drives ticks
src/twenty/ui/engine_controller.py - Timer state machine → Timer event types: emits events
src/twenty/core/engine.py - Qt timer bridge → Timer event types: translates events
src/twenty/ui/engine_controller.py - System tray → Qt timer bridge: controls timer
src/twenty/ui/tray.py - System tray → Settings window: opens
src/twenty/ui/tray.py - Overlay manager → Qt timer bridge: subscribes to events
src/twenty/ui/overlay/overlay_manager.py - Overlay manager → Break overlay: creates per-screen
src/twenty/ui/overlay/overlay_manager.py - Break overlay → Countdown display: displays countdown
src/twenty/ui/overlay/overlay_window.py - Break overlay → Qt timer bridge: requests skip
src/twenty/ui/overlay/overlay_manager.py - Settings window → Settings controller: updates preferences
src/twenty/ui/settings_window/settings_dialog.py - Settings controller → Settings persistence: loads and saves
src/twenty/ui/settings_controller.py - Settings persistence → Settings model: validates settings
src/twenty/config/store.py - Settings window → Qt timer bridge: applies durations
src/twenty/ui/settings_window/settings_dialog.py - Break chime → Qt timer bridge: plays on break
src/twenty/services/sound.py - Break chime → Settings controller: reads live settings
src/twenty/services/sound.py - Settings window → Autostart interface: configures login launch
src/twenty/ui/settings_window/settings_dialog.py - Autostart interface → Linux autostart: selects backend
README.md - Autostart interface → macOS autostart: selects backend
README.md - Autostart interface → Windows autostart: selects backend
README.md - App startup → Shared visual theme: configures palette
src/twenty/app.py - Overlay manager → Shared visual theme: uses palette
src/twenty/ui/overlay/overlay_manager.py - Settings window → Shared visual theme: uses palette
src/twenty/ui/settings_window/settings_dialog.py