How ngxx-fus/xclipboardcapture works
XClipboardCapture is an X11 clipboard-history manager: it captures clipboard changes into local history and exposes that history through a Rofi picker so a chosen item can be restored to the clipboard. The README documents text and image files in the history and a temporary Rofi menu file. The sampled source confirms the X11 transfer, file/list access, and application-loop responsibilities; some menu-selection and initialization wiring is unsampled, so those links are omitted where not established.
Main entry points: ClipboardCapture.c Capture lifecycle · xClipBoardCapture.c Application loop · CBC_SysFile.c History list · CBC_Setup.h Runtime configuration
Components 14
Application control
- Application loop
xClipBoardCapture.c - Capture lifecycle
ClipboardCapture.c - Runtime configuration
CBC_Setup.h
Clipboard transfer
- X11 runtime
ClipboardCapture.c - Capture and serve
ClipboardCapture.c
History and storage
- History list
CBC_SysFile.c - Clipboard files
CBC_SysFile.c
Picker interface
- Rofi menu
ClipboardCapture.c - Menu handoff file
CBC_Setup.h
Shared utilities
- Logging
xUniversal/xUniversal.c
Other components
- User
- POSIX signals
- X server
- Rofi
Connections 15
- User → POSIX signals: requests picker
- POSIX signals → Application loop: sets popup flag
- Application loop → Capture lifecycle: initializes
- Application loop → Rofi menu: opens picker
- Capture lifecycle → Runtime configuration: reads settings
- Capture lifecycle → X11 runtime: starts runtime
- X11 runtime → X server: exchanges events and data
- X11 runtime → Capture and serve: handles transfers
- Capture and serve → Clipboard files: writes captured data
- X11 runtime → History list: reads selected item
- History list → Clipboard files: reads and manages files
- Rofi menu → History list: reads history
- Rofi menu → Menu handoff file: writes menu entries
- Rofi menu → Rofi: launches picker
- Capture lifecycle → Logging: logs status