Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screenshot capture method for D-Bus #3408

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Troplo
Copy link

@Troplo Troplo commented Nov 12, 2023

I've added a new D-Bus method allowing the screen to be captured via dbus-send --session --dest=org.flameshot.Flameshot --type=method_call / org.flameshot.Flameshot.captureScreen string:1 for example.

Having a way to invoke a screen capture via an existing process improves performance drastically when running Flameshot via a shortcut for example, as the official recommended method of executing flameshot gui every time you want to take a screenshot spawns a new instance each time whereas this method allows it to be executed with the instance of Flameshot running in the system tray.

Please let me know if this is an improper use of D-Bus of course, I just believe it's a nice addition to improve performance.

@veracioux
Copy link
Contributor

@Troplo Thank you for the PR. We usually insist on creating an issue and discussing potential features. We used to have a few dbus methods for this purpose (see https://github.com/flameshot-org/flameshot/blob/6d29e133d3182b9162c7dee15f12afc510cf8c4b/data/dbus/org.flameshot.Flameshot.xml), because previously flameshot gui and the other commands actually did rely on the daemon to do the work. But when I made the commands standalone, I removed the DBus methods as everything could be performed via CLI.

Can you describe the performance issues you are having, maybe open an issue as well?

@Troplo
Copy link
Author

Troplo commented Nov 26, 2023

Made an issue #3419 describing the performance issues.

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.

None yet

2 participants