-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Feature Request: Take screenshot of selection/viewport #1084
Comments
Thanks for the request! I think this is largely served by the windows snipping tool, I realize that doesn't let you manipulate the background or change the padding, but I'm not certain that the Terminal is the right place to do this work. I'll leave this open for another team member to comment on. |
I should have cleaned out what's the main purpose of this: With this feature one could easly tripple click whole line (when that's implemented), click some shortcut and he ends up with nice, pixel perfect screenshot. If this could be done be the screenshot tool aligning to console text, I'd be fine. |
Is this perhaps just another format of data to be put onto the clipboard with Ctrl+C? plain text, rtf text, html text... and a png? |
@miniksa Most probably, but I wouldn't go with Ctrl+C. Or meaby the screenshot (or some other data, like area coords) should be sent to snipping tool. |
In general texts should remain as texts. In Word, Excel... or any where you can just paste the text from the console and format as monospaced. That'll make it more readable and you can also zoom without loss of quality |
@phuclv90 Although ideally it's true that it's best to store terminal's state as text, it's not always applicable. |
@mcpiroman regarding formatted text some terminals do support copying that. Most often they'll have to put multiple formats in the clipboard (at least text + rtf + html) and the app where you paste will choose the format they want For auditing it's still better to use some tools like the |
I believe @carlos-zamora is already working on HTML & RTF copy/paste, so watch out for PR's in this area soon :) |
If accurately styled text copy was a thing, that would definitly cover most use cases of terminal recording, and in more robous way than screenshot. You could even produce html that looks like the terminal window itself, but that's maybe to much ;). |
@cinnamon-msft and I were actually discussing the possibility of making a setting for triple-click to select "the entire row" vs "the entire viewport". Sounds like you want an actual keybinding though so that shouldn't be too much additional work. |
As a note, Markdown (and so GitHub or StackExchange) don't support colorful text (even in html). So for full styling, image is the only option here (AFAIK). |
From #15147: if there's no selection, maybe the action should just export the entire viewport to the image file. Also noted from discussion: This might be Hard to include all the XAML-y bits, like the background image & acrylic |
Summary of the new feature/enhancement
You can take a screenshot of whole window with Alt+Prt Scr, but it would be handy if one could do so only on selected text.
With box selection this would contain selected area, whereas with regular selection it would contain every selected line.
In profile settings one could be able to choose whether the background of taken screenshot should be the actual displayed background or something else (probably solid color). This would ease making tutorials or reports, when one doesn't want to show what's behind the terminal.
Other option could be additional marigin, as so the first pixel of text isn't the first pixel of image.
I'm not sure about appropriate shortcut, meaby some Func+Prt Scr?
Proposed technical implementation details (optional)
I can see this being solved either by taking regular screen shot or re-rendering selected text to buffer. Idk which option's better, but with custom background it seem's like the second one.
The text was updated successfully, but these errors were encountered: