.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "wl-mirror" "1" "2025-08-07" .PP .SH NAME .PP wl-mirror - a simple Wayland output mirror client .PP .SH SYNOPSIS .PP \fBwl-mirror\fR [-h,-V,-v,-c,-i,-f,-s S,-b B,-t T,-r R,-S] .PP .SH OPTIONS .PP \fB-h, --help\fR .RS 4 Show help message and exit.\& .PP .RE \fB-V, --version\fR .RS 4 Show version information and exit.\& .PP .RE \fB-v, --verbose\fR \fB --no-verbose\fR .RS 4 Enable or disable debug logging.\& .PP .RE \fB-c, --show-cursor\fR \fB --no-show-cursor\fR .RS 4 Show the cursor on the mirrored surface (enabled by default).\& .PP .RE \fB-i, --invert-colors\fR \fB --no-invert-colors\fR .RS 4 Invert colors on the mirrored surface.\& .PP .RE \fB-f, --freeze\fR \fB --unfreeze\fR \fB --toggle-freeze\fR .RS 4 Freeze, unfreeze, or toggle freezing of the current image on the screen.\& .PP .RE \fB-F, --fullscreen\fR .RS 4 Open as a fullscreen window, or make the current window fullscreen in stream mode.\& .PP .RE \fB --no-fullscreen\fR .RS 4 Open as a regular window (enabled by default), or exit fullscreen in stream mode.\& .PP .RE \fB --fullscreen-output O\fR .RS 4 Set a different output to fullscreen on (default is the current output), implies \fB--fullscreen\fR.\& .PP .RE \fB --no-fullscreen-output\fR .RS 4 Sets the target fullscreen output back to the current window output, implies \fB--no-fullscreen\fR.\& .PP .RE \fB-s f, --scaling fit\fR .RS 4 Scale to fit and if necessary add letterboxing (enabled by default).\& .PP .RE \fB-s c, --scaling cover\fR .RS 4 Scale to cover and if necessary crop the image.\& .PP .RE \fB-s e, --scaling exact\fR .RS 4 Use exact multiple scaling and if necessary add letterboxing.\& .PP .RE \fB-s l, --scaling linear\fR .RS 4 Use linear scaling (enabled by default).\& .PP .RE \fB-s n, --scaling nearest\fR .RS 4 Use nearest-neighbor scaling.\& .PP .RE \fB-b B, --backend B\fR .RS 4 Use a specific screen capture backend, see \fBBACKENDS\fR.\& .PP .RE \fB-t T, --transform T\fR .RS 4 Apply custom transform (rotation and flipping), see \fBTRANSFORMS\fR.\& .PP .RE \fB-r R, --region R\fR .RS 4 Capture custom screen region R, see \fBREGIONS\fR.\& .PP .RE \fB-S, --stream\fR .RS 4 Accept a stream of additional options on stdin, see \fBSTREAM MODE\fR.\& .PP .RE \fB--title T\fR .RS 4 Specify a custom title T for the mirror window.\& This title can contain placeholders, see \fBTITLE PLACEHOLDERS\fR .PP .RE .SH BACKENDS .PP \fBauto\fR .RS 4 Automatically try backends in order of backend efficiency and use the first that works (enabled by default).\& The next backend is selected automatically when the current backend fails to capture a frame 10 times in a row.\& .PP The current fallback order is: .PP .PD 0 .IP \(bu 4 \fBextcopy-dmabuf\fR (if compiled with libGBM) .IP \(bu 4 \fBscreencopy-dmabuf\fR (if compiled with libGBM) .IP \(bu 4 \fBexport-dmabuf\fR .IP \(bu 4 \fBextcopy-shm\fR .IP \(bu 4 \fBscreencopy-shm\fR .PD .PP .RE \fBexport-dmabuf\fR .RS 4 Use the \fBwlr-export-dmabuf-unstable-v1\fR protocol to capture outputs (requires wlroots).\& This backend keeps the image data on the GPU and does not need expensive copies to the CPU and back.\& .PP .RE \fBscreencopy-dmabuf\fR .RS 4 Use the \fBwlr-screencopy-unstable-v1\fR protocol to capture outputs (requires wlroots) This backend keeps the image data on the GPU and does not need expensive copies to the CPU and back.\& This backend requires wl-mirror to be compiled with support for allocating DMA-BUFs using libGBM.\& .PP .RE \fBscreencopy-shm\fR .RS 4 Use the \fBwlr-screencopy-unstable-v1\fR protocol to capture outputs (requires wlroots) This backend passes the image data via shared memory on the CPU, but may have better compatibility with complex GPU driver configurations (e.\&g.\&, multi GPU).\& .PP .RE \fBscreencopy\fR .RS 4 Automatically tries \fBscreencopy-dmabuf\fR or \fBscreencopy-shm\fR and uses the first one that works.\& Fallback works the same as with \fBauto\fR.\& .PP .RE \fBextcopy-dmabuf\fR .RS 4 Use the \fBext-image-copy-capture-v1\fR protocol to capture outputs This backend keeps the image data on the GPU and does not need expensive copies to the CPU and back.\& This backend requires wl-mirror to be compiled with support for allocating DMA-BUFs using libGBM.\& .PP .RE \fBextcopy-shm\fR .RS 4 Use the \fBext-image-copy-capture-v1\fR protocol to capture outputs This backend passes the image data via shared memory on the CPU, but may have better compatibility with complex GPU driver configurations (e.\&g.\&, multi GPU).\& .PP .RE \fBextcopy\fR .RS 4 Automatically tries \fBextcopy-dmabuf\fR or \fBextcopy-shm\fR and uses the first one that works.\& Fallback works the same as with \fBauto\fR.\& .PP .RE .SH TRANSFORMS .PP Transforms are specified as a dash-separated list of flips followed by a rotation amount.\& Flips are applied before rotations, both flips and rotations are optional.\& Custom transformations are applied after adjusting for the wayland output transform, so that if no custom transformations are applied, the mirrored surface is displayed right-side-up.\& .PP \fBnormal\fR .RS 4 No transformation (default transformation).\& .PP .RE \fBflipX, flipY\fR .RS 4 Flip the X or Y coordinate of the image, i.\&e.\& \fBflipX\fR means the mirrored surface has left and right swapped.\& .PP .RE \fB0cw, 90cw, 180cw, 270cw\fR .RS 4 Apply a clockwise rotation.\& .PP .RE \fB0ccw, 90ccw, 180ccw, 270ccw\fR .RS 4 Apply a counter-clockwise rotation.\& .PP .RE The following transformation options are provided for compatibility with \fBsway-output\fR(5) transforms: .PP \fBflipped\fR .RS 4 Same as \fBflipX\fR.\& .PP .RE \fB0, 90, 180, 270\fR .RS 4 Same as \fB0cw, 90cw, 180cw, 270cw\fR.\& .PP .RE .SH REGIONS .PP Regions are specified in the format used by the \fBslurp\fR(1) utility: .PP .RS 4 \&'\&\fBx\fR,\fBy\fR \fBwidth\fRx\fBheight\fR [\fBoutput\fR]'\& .PP .RE In \fBslurp\fR(1) syntax, this would be specified as follows (the last part with \fB%o\fR is optional): .PP .RS 4 \&'\&\fB%x\fR,\fB%y\fR \fB%w\fRx\fB%h\fR \fB%o\fR'\& .PP .RE When processing the region option, the region is translated into output coordinates, so when the output moves, the captured region moves with it.\& When a region is specified, the \fBoutput\fR positional argument is optional.\& .PP .SH STREAM MODE .PP In stream mode, \fBwl-mirror\fR interprets lines on stdin as additional command line options.\& .PP .PD 0 .IP \(bu 4 Arguments can be quoted with single or double quotes, but every argument must be fully quoted.\& .IP \(bu 4 Unquoted arguments are split on whitespace.\& .IP \(bu 4 No escape sequences are implemented.\& .PD .PP Option lines on stdin are processed asynchronously, and can override all options and the captured output.\& Stream mode is used by \fBwl-present\fR(1) to add interactive controls to \fBwl-mirror\fR.\& .PP .SH TITLE PLACEHOLDERS .PP The title string supports the following placeholders: .PP .PD 0 .IP \(bu 4 {width}, {height}: size of the mirrored area .IP \(bu 4 {x}, {y}: offsets on the screen .IP \(bu 4 {target_width}, {target_height}, {target_output}: info about the mirrored device .PD .PP A few perhaps useful examples: .PP .RS 4 --title '\&Wayland Mirror Output {target_output}'\& .PP --title '\&{target_output}:{width}x{height}+{x}+{y}'\& .PP --title '\&resize set {width} {height} move position {x} {y}'\& .PP .RE .SH AUTHORS .PP Maintained by Ferdinand Bachmann .\& More information on \fBwl-mirror\fR can be found at .\& .PP .SH SEE ALSO .PP \fBwl-present\fR(1) \fBslurp\fR(1) \fBsway-output\fR(5)