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

Printscreen shortcut #375

Closed
ericdallo opened this issue Mar 20, 2020 · 13 comments
Closed

Printscreen shortcut #375

ericdallo opened this issue Mar 20, 2020 · 13 comments
Labels
enhancement New feature or request hover question User questions

Comments

@ericdallo
Copy link

Is your feature request related to a problem? No

A clear and concise description of what the problem is.
What about a shortcut that prints the hover application screen? Android emulator has this feature and I think it's very useful.

Describe the feature you'd like

Something like Alt + PrtScr

A clear and concise description of what you want to happen.

@ericdallo ericdallo added the enhancement New feature or request label Mar 20, 2020
@provokateurin
Copy link
Member

Would you like it to only be available in debug or always?

@ericdallo
Copy link
Author

@jld3103 I didn't know that there's a hover debug mode, or you are referring to flutter's debug mode?

@provokateurin
Copy link
Member

Yes

@ericdallo
Copy link
Author

I don't see any problem the print shortcut works for non debug profile too, but if you want to restrict only for debug, I'm okay with that :)

@pchampio
Copy link
Member

It's already available in the flutter toolchain!

flutter screenshot --observatory-uri=http://127.0.0.1:50300/XXXXX --type=rasterizer

$ flutter screenshot --helpTake a screenshot from a connected device.

Usage: flutter screenshot [arguments]
-h, --help                      Print this usage information.
-o, --out=<path/to/file>        Location to write the screenshot.
    --observatory-uri=<URI>     The observatory URI to connect to.
                                This is required when --type is
                                "skia" or "rasterizer".
                                To find the observatory URI, use
                                "flutter run" and look for "An
                                Observatory ... is available at"
                                in the output.

    --type=<type>               The type of screenshot to
                                retrieve.

          [device] (default)    Delegate to the device's native
                                screenshot capabilities. This
                                screenshots the entire screen
                                currently being displayed
                                (including content not rendered by
                                Flutter, like the device status
                                bar).
          [rasterizer]          Render the Flutter app using the
                                rasterizer. Requires
                                --observatory-uri
          [skia]                Render the Flutter app as a Skia
                                picture. Requires
                                --observatory-uri

Run "flutter help" to see global options.

image

@ericdallo
Copy link
Author

Thank you very much @pchampio, It works!
If there was any way of getting this XXXXX easily, I could make some shortcut for hover.el to take the screenshot 🤔 😔

@pchampio
Copy link
Member

Haha, I'm working on this at the moment^^

@ericdallo
Copy link
Author

Thanks! 🤞

@pchampio
Copy link
Member

I have removed the auth-code from the observatory URL. engine/switches.h This wasn't an option before. No more XXXXX at the end of the url.

I've also enable enable-service-port-fallback engine/switches.h, this way, multiple hover run can be launched without having to use the hover run --observatory-port flag.

In the context of hover.el, It's up to you to provide an --observatory-port that isn't already used, relying only on the default port will cause issues when multiple user are running hover run.

image

@pchampio
Copy link
Member

fixed in the latest version of hover.
go get -u github.com/go-flutter-desktop/hover

@pchampio pchampio added hover question User questions labels Mar 20, 2020
@ericdallo
Copy link
Author

Uow, nice!
I'll sure implement this :D
Thanks for your help @pchampio

@pchampio
Copy link
Member

@ericdallo could you read #129 (comment)
I'll like your opinion, and how are you performing hot reload? (manually or on save, if on save, are you sending 'r' key-presses into the hover proc)

@ericdallo
Copy link
Author

@pchampio, hover.el has the option to manually input commands like r or R, but also allows keybindings to do that, like in this example. It has the feature that on file save, it triggers auto-reload(sending the r command to hover background process).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hover question User questions
Development

No branches or pull requests

3 participants