-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Reduce dependence on D-Bus #2003
Conversation
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
We need to wait until the upload widget (or similar widgets) have finished before exiting. This must be done using a signal. The problem is that CaptureRequest can't be guaranteed to survive until the widget has finished what it's doing. Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
The messages were caused by the color wheel. Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
I have tested on Windows now. Everything should work as it did before this PR. But the MVP is someone who can test this on MacOS, especially someone who can make CLI work there (shouldn't be too difficult, just remove a few preprocessors probably). I tried to make CLI parsing work on Windows. It turns out you can't even print to stdout if you don't make flameshot a console application. Even if we enabled the parsing, we would still need some form of IPC to make all the features work. Not worth it! And I don't have the patience to suffer through Windows, Visual Studio & co any more than the bare minimum necessary. Sorry. |
@mmahmoudian As my most reliable tester 😉, I'd like you to test this when you find the time. |
I can commit to testing on Mac, ive got a reliable VM set up. |
Signed-off-by: Haris Gušić <[email protected]>
The test script also seems to nominally work, but it will need some tweaks for MacOs in the future. Namely notify-send and display do not exist on Mac. |
@borgmanJeremy Could you tweak the script and send it to me, or submit it as a PR to |
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
@borgmanJeremy Replying to #2054 (comment) It should be now. The only chore that's left to do is to customize the test script for MacOS, but you can do that in a separate PR. Sorry it took me so long. There was a problem with QSettings when multiple Right now I'm thinking that we can get rid of DBus altogether. But I'd like to merge this ASAP and leave that for a future PR. |
Ok awesome I'll check it out in a day or so. I don't think we can ever get rid of dbus entirely as I am not aware of another way to take a screenshot on wayland . |
It seems to be working today, must have been an OS issue. I have been testing manually but will work on porting the script now. The only issue I have identified so far is the --clipboard option is not working. |
Signed-off-by: Haris Gušić <[email protected]>
The segfault was fixed with this commit: 58e37b0
Okay @veracioux the notifications are fixed on the macos_dbus branch. Github would not let me submit this as a PR to your fork for some reason. The only remaining issue is 'display' does not work on Macos but I would really like to get this merged ASAP before more merge conflicts happen. I say lets merge this week. |
@borgmanJeremy Thanks, I'll try to merge it tonight. |
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
Signed-off-by: Haris Gušić <[email protected]>
This reverts commit f79ebad. Apparently, the recommendation to start xmonad with dbus-launch may have been obsolete, because nowadays (on Arch Linux) dbus is started by systemd (see https://bugs.archlinux.org/task/60179, specifically "Additional comments about closing"). Also, flameshot recently updated to v11.0.0, which ― if I understood the changelog correctly ― should no longer require dbus for CLI usage (see https://github.com/flameshot-org/flameshot/releases/tag/v11.0.0 and flameshot-org/flameshot#2003).
Closes #1292.
Closes #1480.
Closes #1579.
Closes #1716.
As a side effect: Closes #1771.
May fix #1872.
May fix #1673.
My gut instinct says that this could be involved with #1246 somehow.
NOTE: I tested nothing on a Mac
Terminology
Things you should know:
I.e. when all pinned widgets are closed, or when the clipboard is changed by another application.
Changes and TODO (there will be more):
flameshot screen
does not rely on dbus (except for hosting clipboard and pins)flameshot full
does not rely on dbus (...)flameshot gui
does not rely on dbus (...)flameshot launcher
independent from dbusflameshot config
independent from dbusflameshot launcher
crashes when launching GUILook into addressing working only first time in sway. #1672 in thisflameshot gui
mutual exclusivityautoCloseIdleDaemon
, unix-only, default: falseTODO (implementation details):
Controller
andFlameshotDaemon
- make a clear distinction between themTODO (when merging)
Testing:
a Mac machine.
tests
directory inside the repository root. These will test most of the CLI features, but not all!screen
,full
andgui
subcommands with various options and verify that the daemon is not launched, except when it needs to host the clipboard and/or pinned screenshots. You can use the scripttests/action_options.sh
flameshot gui
works correctly with various options and various types of manual interactionxclip -o -t TARGETS -selection clip
on my system for some reason. In other words: make sure to kill the daemon before doing the other tests.
To be discussed
Do we allow multiple instances offlameshot gui
to run? A benefit of this is the ability to take screenshots of flameshot itself.Add a config option to keep daemon running even if not needed??What should we do with the system tray if the daemon is running merely to host pins, clipboard, etc?