How ezykl/ghostnotes works
GhostNotes is a Windows floating sticky-note app designed to keep private notes visible to the user but excluded from screen capture. The main workflow starts the app, restores persisted notes into floating editable windows, and saves note changes in the background. Users can create and toggle notes with global hotkeys or the system tray; windows also support rich-text formatting, collapse-to-pill behavior, and appearance settings. The excerpts show the main orchestration and several service calls; other feature details are documented in the README but their implementations were not fully sampled.
Main entry points: NoteManager.cs Note manager · App.xaml.cs App startup · CaptureGuard.cs Capture protection · TrayController.cs System tray
Components 17
App runtime
- App startup
src/GhostNotes/App.xaml.cs - Note manager
src/GhostNotes/NoteManager.cs - System tray
src/GhostNotes/TrayController.cs - Tray icon builder
src/GhostNotes/Services/IconBuilder.cs
Notes and editing
- Note model
src/GhostNotes/Models/Note.cs - Note window
src/GhostNotes/NoteWindow.xaml.cs
Windows integration
- Single instance
src/GhostNotes/Services/SingleInstanceGuard.cs - Capture protection
src/GhostNotes/Interop/CaptureGuard.cs - Windows native APIs
src/GhostNotes/Interop/NativeMethods.cs - OS version gate
src/GhostNotes/Interop/VersionGate.cs - Global hotkeys
src/GhostNotes/Services/HotkeyService.cs - Hotkey selection
src/GhostNotes/Services/HotkeySelection.cs
Persistence and utilities
- Note repository
src/GhostNotes/Services/NoteRepository.cs - Autosave scheduler
src/GhostNotes/Services/AutosaveScheduler.cs - Position and zoom
src/GhostNotes/Services/Clamp.cs
Other components
- User
- Windows desktop
Connections 27
- User → App startup: launches
README.md - App startup → Single instance: checks instance
src/GhostNotes/App.xaml.cs - App startup → Capture protection: initializes
src/GhostNotes/App.xaml.cs - App startup → Note manager: creates
src/GhostNotes/App.xaml.cs - App startup → Global hotkeys: registers
src/GhostNotes/App.xaml.cs - App startup → System tray: creates
src/GhostNotes/App.xaml.cs - Note manager → Note repository: loads and saves
src/GhostNotes/NoteManager.cs - Note manager → Note model: manages
src/GhostNotes/NoteManager.cs - Note manager → Note window: attaches
src/GhostNotes/NoteManager.cs - Note manager → Autosave scheduler: schedules saves
src/GhostNotes/NoteManager.cs - Note manager → Capture protection: passes guard
src/GhostNotes/NoteManager.cs - Note manager → Position and zoom: clamps geometry
src/GhostNotes/NoteManager.cs - Note repository → Note model: serializes
src/GhostNotes/Services/NoteRepository.cs - Note window → Note model: edits and displays
src/GhostNotes/NoteWindow.xaml.cs - Note window → Capture protection: applies protection
src/GhostNotes/NoteWindow.xaml.cs - Note window → Windows native APIs: uses window APIs
src/GhostNotes/NoteWindow.xaml.cs - Global hotkeys → Hotkey selection: selects fallback
src/GhostNotes/Services/HotkeyService.cs - Global hotkeys → Windows native APIs: registers keys
src/GhostNotes/Services/HotkeyService.cs - Global hotkeys → Note manager: requests note actions
- System tray → Note manager: controls notes
src/GhostNotes/TrayController.cs - System tray → Global hotkeys: shows notices
src/GhostNotes/TrayController.cs - System tray → Capture protection: shows status
src/GhostNotes/TrayController.cs - System tray → Tray icon builder: renders fallback icon
src/GhostNotes/TrayController.cs - Capture protection → Windows native APIs: sets affinity
src/GhostNotes/Interop/CaptureGuard.cs - Capture protection → OS version gate: checks capability
src/GhostNotes/Interop/CaptureGuard.cs - OS version gate → Windows desktop: gates by build
src/GhostNotes/Interop/VersionGate.cs - Windows native APIs → Windows desktop: calls Win32
src/GhostNotes/Interop/NativeMethods.cs