Skip to content

Add default external application and Alt+Click quick launch (updates #2833) - #5003

Open
anushTikoo wants to merge 6 commits into
flameshot-org:masterfrom
anushTikoo:default-ext-app
Open

anushTikoo wants to merge 6 commits into
flameshot-org:masterfrom
anushTikoo:default-ext-app

Conversation

@anushTikoo

@anushTikoo anushTikoo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Updates PR #2833 by @wd5gnr for the latest codebase. Didn't change the core logic, just cleaned the merge conflicts. Happy to make any tweaks or additions if needed.
Tested on both Fedora KDE and Windows (working on both). Screenshots attached for Fedora KDE, let me know if you want Windows screenshots or a video demo as well.

Issue #2091
config:
image

option to set as default:
image

Update (Bug fix):
So I noticed, when a default application was set, launching it caused an empty dialog to appear on the screen.
emptywidget

Reason:
The check for whether a default app was configured was placed inside the AppLauncherWidget constructor because of which, when launching the default app, the constructor skipped populating any UI elements (such as buttons and layouts), BUT the widget itself was still created and returned to CaptureWidget. CaptureWidget then executed w->show(), resulting in an empty dialog being displayed.

I resolved this and also made a few changes:
I moved the default application check to AppLauncherTool::widget(bool alt) and when a default app exists and alt is not pressed, it bypasses the AppLauncherWidget constructor entirely, directly executes AppLauncherWidget::launchCmd(...), and returns nullptr (Added null check in CaptureWidget, so it doesn't display a non existent dialog). To make this direct execution possible I refactored launchCmd into a static member function instead of an instance member function dependent on the object state. It handles temporary file creation independently when called directly, and can use the existing temporary file caching when invoked from within the open with dialog.

I also tested it on arch hyprland, debian xfce apart from fedora kde and windows , and it doesn't show the empty dialog anymore and the functionality works too. On debian xfce, alt + click gets intercepted by the window manager for moving windows rather than passing through to the application (unlike modern desktop environments that use the super key), so this is a window manager shortcut behavior rather than an issue and can be bypassed by using ctrl+alt+click.

Latest Update:
I have refactored the implementation to make the changes as minimal and maintainable as possible against master. The Alt-modifier check is now queried directly inside AppLauncher rather than passing the state through core capture pipeline classes, and the click behavior has been updated so that a normal click or Ctrl+O launches the default application while Alt+click opens the open with dialog. All general configuration changes have been removed, but could add them if needed, right now it felt unnecessary.

@anushTikoo
anushTikoo marked this pull request as draft October 24, 2026 14:50
@anushTikoo

Copy link
Copy Markdown
Contributor Author

@borgmanJeremy, please let me know if this implementation makes sense when you get the chance or if there are any other changes you'd like to see. I'd love to know if you're interested in this feature.

@anushTikoo
anushTikoo marked this pull request as ready for review October 27, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants