Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

Open selected result in quicklook

Open Garulf opened this issue 4 years ago • 16 comments

F1 Opens Quicklook on your selection.

~~Right now it's just a proof of concept.... Logic and features will be added soon™~~

Todo:

  • [x] Change preview when selection changes
  • [x] Logic to determine what to open
  • [x] Add field for Plugin's to use ...and more

Preview:

https://user-images.githubusercontent.com/535299/144653778-e0188ee1-ed1b-4647-92de-5341fced6919.mp4

Garulf avatar Dec 03 '21 18:12 Garulf

Does it say what line is triggering this exception?

Garulf avatar Jan 27 '22 04:01 Garulf

Nah sorry, that's why I didn't dig into it, I will leave it with you since I want to continue onto other prs. You can replicate the issue right?

jjw24 avatar Jan 27 '22 05:01 jjw24

Nah sorry, that's why I didn't dig into it, I will leave it with you since I want to continue onto other prs. You can replicate the issue right?

I never got this error. Is this from the CI build?

Garulf avatar Jan 27 '22 05:01 Garulf

it's coming from local run in visual studio

jjw24 avatar Jan 27 '22 06:01 jjw24

Tested with the CI build, it's happening there as well. Simply type 'a' or jpg causes flow to hang indefinitely.

jjw24 avatar Jan 27 '22 08:01 jjw24

Tested with the CI build, it's happening there as well. Simply type 'a' or jpg causes flow to hang indefinitely.

Found the issue!

If QuickLook is unavailable and Flow tries to open a pipe and gets stuck. Adding a timeout helps but isn't the full solution.

An Async option would be best.

Garulf avatar Jan 28 '22 09:01 Garulf

When would quick look not be available? Is it when the file is not an image?

jjw24 avatar Jan 30 '22 06:01 jjw24

so this needs quicklook installed before can be used? do we want to use Droplex to handle it?

jjw24 avatar Feb 02 '22 10:02 jjw24

so this needs quicklook installed before can be used? do we want to use Droplex to handle it?

I'm unsure. I originally designed this so it would just work no matter if it was installed or not.

@Flow-Launcher/team any opinions?

Garulf avatar Feb 02 '22 22:02 Garulf

I wonder if there is a way we can set QL to stay on top, hide and set window size via the code? This will help make QL usage feel more integrated with flow.

jjw24 avatar Feb 03 '22 11:02 jjw24

I wonder if there is a way we can set QL to stay on top, hide and set window size via the code? This will help make QL usage feel more integrated with flow.

As far as I can tell there is no API to pragmatically control QuickLook other than simply toggling it and switching files.

https://github.com/QL-Win/QuickLook/issues/557

Garulf avatar Feb 03 '22 15:02 Garulf

TODO: need to check if window is open to avoid wasting CPU time.

jjw24 avatar Feb 08 '22 21:02 jjw24

You can set QL to stay on top on each launch by setting QuickLook.config's attribute TopMost to true

jjw24 avatar Feb 08 '22 22:02 jjw24

TODO: need to check if window is open to avoid wasting CPU time.

Quicklook author seems to think detecting the window is more cpu time then just sending the pipe and failing. I haven't tested this but it seems logical.

Garulf avatar Feb 08 '22 22:02 Garulf

I got the impression from the linked issue the author meant better to check window exists so to avoid wasting CPU, where did you see sending the pipe and failing is better? If failing is better than yeah that would be good.

jjw24 avatar Feb 09 '22 21:02 jjw24

I got the impression from the linked issue the author meant better to check window exists so to avoid wasting CPU, where did you see sending the pipe and failing is better? If failing is better than yeah that would be good.

You’re correct. I must have misread his intentions.

Garulf avatar Feb 09 '22 22:02 Garulf

Closing in favor of #2082

Garulf avatar Apr 22 '23 19:04 Garulf