feat: add -O to print focused output geometry immediately#183
Open
mbroemme wants to merge 1 commit intoemersion:masterfrom
Open
feat: add -O to print focused output geometry immediately#183mbroemme wants to merge 1 commit intoemersion:masterfrom
-O to print focused output geometry immediately#183mbroemme wants to merge 1 commit intoemersion:masterfrom
Conversation
Add a new -O option that queries the output currently containing the pointer and prints its box using the existing format string machinery, then exits without entering region selection. Reject -O when combined with -p or -r to avoid ambiguous behavior. This enables grabbing the active display dimensions instantly (e.g. for scripts) without requiring a click/drag.
22dc509 to
cfae750
Compare
Owner
|
I don't think showing a layer surface and then immediately closing it is a good way to get the focused output. I think this should be handled on the capture side instead. See e.g. https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/issues/116 |
Author
|
Which basically means to replace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Take a screenshot with
grimusingslurpof the currently focused display with thePrintkey. PressPrintonce to grab a screenshot of the monitor your mouse is currently on (the focused output), without selecting a region or clicking.Why
On multi-monitor setups, "full-screen screenshot" often captures all outputs (huge image) or the wrong monitor. With
slurp -O, the screenshot is always of the display you’re actively using.Example:
Bind
Printto:A PNG file is created containing exactly the focused output (its x/y origin and width/height), with no interactive selection step.
Implementation
Add a new
-Ooption that queries the output currently containing the pointer and prints its box using the existing format string machinery, then exits without entering region selection. Reject-Owhen combined with-por-rto avoid ambiguous behavior. This enables grabbing the active display dimensions instantly (e.g. for scripts) without requiring a click/drag.