How daniliuskosmaches/bufferdevicemanager works
BufferDeviceManager is a clipboard watcher with platform-specific behavior. On Windows, the CLI subscribes to Win+V history events, reads item IDs, compares snapshots, and prints additions or removals. On Linux, it polls the current clipboard and prints changes; this is separate from the Windows history workflow. A UDP device-discovery listener exists, but the clipboard watcher does not send data to it. Edges reflect the README and shown source; the Android file is only a stub.
Main entry points: windows.go History CLI · events_windows.go Event subscriptions · history_windows.go History reader · linux.go Clipboard poller
Components 11
Windows history
- History CLI
internal/clipboard/windows.go - History reader
internal/clipboard/history_windows.go - Event subscriptions
internal/clipboard/events_windows.go - Dispatcher queue
internal/clipboard/events_windows.go - Snapshot diff
internal/historydiff/diff.go
Linux clipboard
- Clipboard poller
internal/clipboard/linux.go
Device discovery
- Device listener
internal/transport/Network.go
Other components
- CLI user
- Windows Runtime
- wl-clipboard
- UDP device peer
Connections 11
- CLI user → History CLI: runs CLI
README.md - History CLI → History reader: reads history
internal/clipboard/windows.go - History CLI → Event subscriptions: subscribes
internal/clipboard/windows.go - History CLI → Dispatcher queue: starts queue
internal/clipboard/windows.go - History CLI → Event subscriptions: waits for signals
internal/clipboard/windows.go - History reader → Windows Runtime: calls history API
internal/clipboard/history_windows.go - Event subscriptions → Windows Runtime: registers handlers
internal/clipboard/events_windows.go - History CLI → Snapshot diff: compares snapshots
internal/clipboard/windows.go - CLI user → Clipboard poller: runs app
README.md - Clipboard poller → wl-clipboard: reads clipboard
README.md - UDP device peer → Device listener: sends UDP packet
internal/transport/Network.go