2022-02-10 14:37:02 +00:00
|
|
|
#compdef -N scrcpy -N scrcpy.exe
|
|
|
|
#
|
|
|
|
# name: scrcpy
|
|
|
|
# auth: hltdev [hltdev8642@gmail.com]
|
|
|
|
# desc: completion file for scrcpy (all OSes)
|
|
|
|
#
|
|
|
|
|
|
|
|
local arguments
|
|
|
|
|
|
|
|
arguments=(
|
|
|
|
'--always-on-top[Make scrcpy window always on top \(above other windows\)]'
|
2024-11-15 18:17:04 +00:00
|
|
|
'--angle=[Rotate the video content by a custom angle, in degrees]'
|
2023-02-18 17:32:43 +00:00
|
|
|
'--audio-bit-rate=[Encode the audio at the given bit-rate]'
|
2023-03-14 22:40:48 +00:00
|
|
|
'--audio-buffer=[Configure the audio buffering delay (in milliseconds)]'
|
2023-11-07 12:09:47 +00:00
|
|
|
'--audio-codec=[Select the audio codec]:codec:(opus aac flac raw)'
|
2023-02-22 21:48:23 +00:00
|
|
|
'--audio-codec-options=[Set a list of comma-separated key\:type=value options for the device audio encoder]'
|
2024-07-16 18:56:18 +00:00
|
|
|
'--audio-dup=[Duplicate audio]'
|
2023-02-19 19:20:29 +00:00
|
|
|
'--audio-encoder=[Use a specific MediaCodec audio encoder]'
|
2024-07-15 08:57:46 +00:00
|
|
|
'--audio-source=[Select the audio source]:source:(output mic playback)'
|
2023-03-13 08:23:02 +00:00
|
|
|
'--audio-output-buffer=[Configure the size of the SDL audio output buffer (in milliseconds)]'
|
2023-02-21 18:56:44 +00:00
|
|
|
{-b,--video-bit-rate=}'[Encode the video at the given bit-rate]'
|
2023-10-26 21:54:34 +00:00
|
|
|
'--camera-ar=[Select the camera size by its aspect ratio]'
|
2023-10-28 00:20:19 +00:00
|
|
|
'--camera-high-speed=[Enable high-speed camera capture mode]'
|
2023-07-16 09:07:19 +00:00
|
|
|
'--camera-id=[Specify the camera id to mirror]'
|
2023-07-22 09:17:05 +00:00
|
|
|
'--camera-facing=[Select the device camera by its facing direction]:facing:(front back external)'
|
2023-10-28 00:20:19 +00:00
|
|
|
'--camera-fps=[Specify the camera capture frame rate]'
|
2023-07-16 09:07:19 +00:00
|
|
|
'--camera-size=[Specify an explicit camera capture size]'
|
Add --capture-orientation
Deprecate --lock-video-orientation in favor of a more general option
--capture-orientation, which supports all possible orientations
(0, 90, 180, 270, flip0, flip90, flip180, flip270), and a "locked" flag
via a '@' prefix.
All the old "locked video orientations" are supported:
- --lock-video-orientation -> --capture-orientation=@
- --lock-video-orientation=0 -> --capture-orientation=@0
- --lock-video-orientation=90 -> --capture-orientation=@90
- --lock-video-orientation=180 -> --capture-orientation=@180
- --lock-video-orientation=270 -> --capture-orientation=@270
In addition, --capture-orientation can rotate/flip the display without
locking, so that it follows the physical device rotation.
For example:
scrcpy --capture-orientation=flip90
always flips and rotates the capture by 90° clockwise.
The arguments are consistent with --display-orientation and
--record-orientation and --orientation (which provide separate
client-side orientation settings).
Refs #4011 <https://github.com/Genymobile/scrcpy/issues/4011>
PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
2024-11-14 19:19:40 +00:00
|
|
|
'--capture-orientation=[Set the capture video orientation]:orientation:(0 90 180 270 flip0 flip90 flip180 flip270 @0 @90 @180 @270 @flip0 @flip90 @flip180 @flip270)'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--crop=[\[width\:height\:x\:y\] Crop the device screen on the server]'
|
|
|
|
{-d,--select-usb}'[Use USB device]'
|
|
|
|
'--disable-screensaver[Disable screensaver while scrcpy is running]'
|
2023-11-20 12:09:46 +00:00
|
|
|
'--display-id=[Specify the display id to mirror]'
|
2023-11-19 00:06:59 +00:00
|
|
|
'--display-orientation=[Set the initial display orientation]:orientation values:(0 90 180 270 flip0 flip90 flip180 flip270)'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-e,--select-tcpip}'[Use TCP/IP device]'
|
2023-06-01 07:52:35 +00:00
|
|
|
{-f,--fullscreen}'[Start in fullscreen]'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
|
2024-09-07 21:06:16 +00:00
|
|
|
'-G[Use UHID/AOA gamepad (same as --gamepad=uhid or --gamepad=aoa, depending on OTG mode)]'
|
2024-09-06 21:08:08 +00:00
|
|
|
'--gamepad=[Set the gamepad input mode]:mode:(disabled uhid aoa)'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-h,--help}'[Print the help]'
|
2024-09-07 21:06:16 +00:00
|
|
|
'-K[Use UHID/AOA keyboard (same as --keyboard=uhid or --keyboard=aoa, depending on OTG mode)]'
|
2024-06-24 20:56:49 +00:00
|
|
|
'--keyboard=[Set the keyboard input mode]:mode:(disabled sdk uhid aoa)'
|
2023-06-05 17:48:21 +00:00
|
|
|
'--kill-adb-on-close[Kill adb when scrcpy terminates]'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--legacy-paste[Inject computer clipboard text as a sequence of key events on Ctrl+v]'
|
2024-10-19 15:16:08 +00:00
|
|
|
'--list-apps[List Android apps installed on the device]'
|
2023-10-24 21:46:56 +00:00
|
|
|
'--list-camera-sizes[List the valid camera capture sizes]'
|
2023-07-16 09:07:19 +00:00
|
|
|
'--list-cameras[List cameras available on the device]'
|
2023-02-23 22:10:15 +00:00
|
|
|
'--list-displays[List displays available on the device]'
|
2023-02-22 22:15:15 +00:00
|
|
|
'--list-encoders[List video and audio encoders available on the device]'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-m,--max-size=}'[Limit both the width and height of the video to value]'
|
2024-09-07 21:06:16 +00:00
|
|
|
'-M[Use UHID/AOA mouse (same as --mouse=uhid or --mouse=aoa, depending on OTG mode)]'
|
2023-06-01 07:52:35 +00:00
|
|
|
'--max-fps=[Limit the frame rate of screen capture]'
|
2024-06-24 20:56:49 +00:00
|
|
|
'--mouse=[Set the mouse input mode]:mode:(disabled sdk uhid aoa)'
|
2024-06-24 21:07:08 +00:00
|
|
|
'--mouse-bind=[Configure bindings of secondary clicks]'
|
2023-06-01 07:52:35 +00:00
|
|
|
{-n,--no-control}'[Disable device control \(mirror the device in read only\)]'
|
|
|
|
{-N,--no-playback}'[Disable video and audio playback]'
|
2024-10-12 07:23:31 +00:00
|
|
|
'--new-display=[Create a new display]'
|
2023-02-03 15:27:34 +00:00
|
|
|
'--no-audio[Disable audio forwarding]'
|
2023-05-24 19:22:31 +00:00
|
|
|
'--no-audio-playback[Disable audio playback]'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--no-cleanup[Disable device cleanup actions on exit]'
|
|
|
|
'--no-clipboard-autosync[Disable automatic clipboard synchronization]'
|
|
|
|
'--no-downsize-on-error[Disable lowering definition on MediaCodec error]'
|
|
|
|
'--no-key-repeat[Do not forward repeated key events when a key is held down]'
|
|
|
|
'--no-mipmaps[Disable the generation of mipmaps]'
|
2024-06-21 14:54:00 +00:00
|
|
|
'--no-mouse-hover[Do not forward mouse hover events]'
|
2022-04-23 13:08:30 +00:00
|
|
|
'--no-power-on[Do not power on the device on start]'
|
2024-11-16 21:45:38 +00:00
|
|
|
'--no-vd-system-decorations[Disable virtual display system decorations flag]'
|
2023-05-07 10:08:50 +00:00
|
|
|
'--no-video[Disable video forwarding]'
|
2023-05-24 19:22:31 +00:00
|
|
|
'--no-video-playback[Disable video playback]'
|
2023-11-20 16:49:04 +00:00
|
|
|
'--orientation=[Set the video orientation]:orientation values:(0 90 180 270 flip0 flip90 flip180 flip270)'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--otg[Run in OTG mode \(simulating physical keyboard and mouse\)]'
|
|
|
|
{-p,--port=}'[\[port\[\:port\]\] Set the TCP port \(range\) used by the client to listen]'
|
2023-06-29 19:36:52 +00:00
|
|
|
'--pause-on-exit=[Make scrcpy pause before exiting]:mode:(true false if-error)'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--power-off-on-close[Turn the device screen off when closing scrcpy]'
|
|
|
|
'--prefer-text[Inject alpha characters and space as text events instead of key events]'
|
|
|
|
'--print-fps[Start FPS counter, to print frame logs to the console]'
|
|
|
|
'--push-target=[Set the target directory for pushing files to the device by drag and drop]'
|
|
|
|
{-r,--record=}'[Record screen to file]:record file:_files'
|
2023-06-01 07:52:35 +00:00
|
|
|
'--raw-key-events[Inject key events for all input keys, and ignore text events]'
|
2023-11-13 08:35:18 +00:00
|
|
|
'--record-format=[Force recording format]:format:(mp4 mkv m4a mka opus aac flac wav)'
|
2023-11-20 13:02:46 +00:00
|
|
|
'--record-orientation=[Set the record orientation]:orientation values:(0 90 180 270)'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--render-driver=[Request SDL to use the given render driver]:driver name:(direct3d opengl opengles2 opengles metal software)'
|
2023-02-28 20:19:43 +00:00
|
|
|
'--require-audio=[Make scrcpy fail if audio is enabled but does not work]'
|
2022-10-08 16:27:29 +00:00
|
|
|
{-s,--serial=}'[The device serial number \(mandatory for multiple devices only\)]:serial:($("${ADB-adb}" devices | awk '\''$2 == "device" {print $1}'\''))'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-S,--turn-screen-off}'[Turn the device screen off immediately]'
|
2024-11-03 21:46:21 +00:00
|
|
|
'--screen-off-timeout=[Set the screen off timeout in seconds]'
|
2023-06-01 07:52:35 +00:00
|
|
|
'--shortcut-mod=[\[key1,key2+key3,...\] Specify the modifiers to use for scrcpy shortcuts]:shortcut mod:(lctrl rctrl lalt ralt lsuper rsuper)'
|
2024-10-19 16:19:10 +00:00
|
|
|
'--start-app=[Start an Android app]'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-t,--show-touches}'[Show physical touches]'
|
|
|
|
'--tcpip[\(optional \[ip\:port\]\) Configure and connect the device over TCP/IP]'
|
2023-06-01 16:46:50 +00:00
|
|
|
'--time-limit=[Set the maximum mirroring time, in seconds]'
|
2022-02-10 14:37:02 +00:00
|
|
|
'--tunnel-host=[Set the IP address of the adb tunnel to reach the scrcpy server]'
|
|
|
|
'--tunnel-port=[Set the TCP port of the adb tunnel to reach the scrcpy server]'
|
|
|
|
'--v4l2-buffer=[Add a buffering delay \(in milliseconds\) before pushing frames]'
|
|
|
|
'--v4l2-sink=[\[\/dev\/videoN\] Output to v4l2loopback device]'
|
|
|
|
{-v,--version}'[Print the version of scrcpy]'
|
2023-06-01 07:52:35 +00:00
|
|
|
{-V,--verbosity=}'[Set the log level]:verbosity:(verbose debug info warn error)'
|
2024-10-29 18:09:01 +00:00
|
|
|
'--video-buffer=[Add a buffering delay \(in milliseconds\) before displaying video frames]'
|
2023-02-20 20:19:36 +00:00
|
|
|
'--video-codec=[Select the video codec]:codec:(h264 h265 av1)'
|
2023-02-21 20:46:34 +00:00
|
|
|
'--video-codec-options=[Set a list of comma-separated key\:type=value options for the device video encoder]'
|
2023-02-22 21:44:01 +00:00
|
|
|
'--video-encoder=[Use a specific MediaCodec video encoder]'
|
2023-07-16 09:07:19 +00:00
|
|
|
'--video-source=[Select the video source]:source:(display camera)'
|
2022-02-10 14:37:02 +00:00
|
|
|
{-w,--stay-awake}'[Keep the device on while scrcpy is running, when the device is plugged in]'
|
|
|
|
'--window-borderless[Disable window decorations \(display borderless window\)]'
|
|
|
|
'--window-title=[Set a custom window title]'
|
|
|
|
'--window-x=[Set the initial window horizontal position]'
|
|
|
|
'--window-y=[Set the initial window vertical position]'
|
|
|
|
'--window-width=[Set the initial window width]'
|
|
|
|
'--window-height=[Set the initial window height]'
|
|
|
|
)
|
|
|
|
|
|
|
|
_arguments -s $arguments
|