How flameshot-org/flameshot works
Flameshot is a desktop screenshot application. Users invoke it through CLI commands, global shortcuts, the tray, or DBus; the application creates a capture request, grabs a screen region, presents an editing overlay, applies tools, then saves, copies, pins, or uploads the result. Configuration controls appearance and shortcuts. The sampled code confirms CLI parsing, request construction, filename generation, upload dispatch, and capture-widget behavior; some runtime connections are inferred only where documented by the repository structure.
Main entry points: flameshotdaemon.cpp Flameshot Daemon · capturelauncher.cpp Capture Launcher · main.cpp Application Main · capturewidget.cpp Capture Widget
Components 26
Entry and Control
- Application Main
src/main.cpp - CLI Parser
src/cli/commandlineparser.cpp - Flameshot Daemon
src/core/flameshotdaemon.cpp - Capture Request
src/core/capturerequest.cpp - DBus Adapter
src/core/flameshotdbusadapter.cpp - Shortcut Filter
src/core/globalshortcutfilter.cpp - Tray Icon
src/widgets/trayicon.cpp
Capture and Editing
- Capture Launcher
src/widgets/capturelauncher.cpp - Screen Grabber
src/utils/screengrabber.cpp - Capture Widget
src/widgets/capture/capturewidget.cpp - Tool Factory
src/tools/toolfactory.cpp
Configuration and Storage
- Config Window
src/config/configwindow.cpp - Config Resolver
src/config/configresolver.cpp - Config Handler
src/utils/confighandler.cpp - Filename Handler
src/utils/filenamehandler.cpp - Config File
Output Integrations
- Save Tool
src/tools/save/savetool.cpp - Upload Tool
src/tools/imgupload/imguploadertool.cpp - Uploader Manager
src/tools/imgupload/imguploadermanager.cpp - Imgur Uploader
src/tools/imgupload/storages/imgur/imguruploader.cpp - Screenshot Saver
src/utils/screenshotsaver.cpp
Other components
- User
- Desktop Environment
- System Clipboard
- Imgur Service
- Screenshot Files
Connections 26
- User → CLI Parser: enters commands
- Desktop Environment → Shortcut Filter: raises shortcuts
- Application Main → CLI Parser: parses arguments
- Application Main → Capture Request: builds request
- Application Main → Flameshot Daemon: starts daemon
- Flameshot Daemon → DBus Adapter: registers interface
- Flameshot Daemon → Tray Icon: manages tray
- Shortcut Filter → Flameshot Daemon: dispatches shortcut
- Flameshot Daemon → Capture Launcher: launches capture
- Capture Request → Capture Launcher: dispatches request
- Capture Launcher → Screen Grabber: grabs screen
- Capture Launcher → Capture Widget: opens overlay
- Capture Widget → Tool Factory: creates tools
- Tool Factory → Save Tool: dispatches save
- Tool Factory → Upload Tool: dispatches upload
- Save Tool → Filename Handler: resolves filename
- Save Tool → Screenshot Saver: saves image
- Screenshot Saver → Screenshot Files: writes screenshot
- Upload Tool → Uploader Manager: requests upload
- Uploader Manager → Imgur Uploader: selects uploader
- Imgur Uploader → Imgur Service: uploads image
- Capture Widget → System Clipboard: copies image
- Config Window → Config Resolver: edits settings
- Config Resolver → Config Handler: resolves values
- Config Handler → Config File: reads and writes
- Filename Handler → Config Handler: reads pattern