|
| 1 | +#compdef -N scrcpy -N scrcpy.exe |
| 2 | +# |
| 3 | +# name: scrcpy |
| 4 | +# auth: hltdev [ [email protected]] |
| 5 | +# desc: completion file for scrcpy (all OSes) |
| 6 | +# |
| 7 | + |
| 8 | +local arguments |
| 9 | + |
| 10 | +arguments=( |
| 11 | + '--always-on-top[Make scrcpy window always on top \(above other windows\)]' |
| 12 | + {-b,--bit-rate=}'[Encode the video at the given bit-rate]' |
| 13 | + '--codec-options=[Set a list of comma-separated key\:type=value options for the device encoder]' |
| 14 | + '--crop=[\[width\:height\:x\:y\] Crop the device screen on the server]' |
| 15 | + {-d,--select-usb}'[Use USB device]' |
| 16 | + '--disable-screensaver[Disable screensaver while scrcpy is running]' |
| 17 | + '--display=[Specify the display id to mirror]' |
| 18 | + '--display-buffer=[Add a buffering delay \(in milliseconds\) before displaying]' |
| 19 | + {-e,--select-tcpip}'[Use TCP/IP device]' |
| 20 | + '--encoder=[Use a specific MediaCodec encoder \(must be a H.264 encoder\)]' |
| 21 | + '--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]' |
| 22 | + '--forward-all-clicks[Forward clicks to device]' |
| 23 | + {-f,--fullscreen}'[Start in fullscreen]' |
| 24 | + {-K,--hid-keyboard}'[Simulate a physical keyboard by using HID over AOAv2]' |
| 25 | + {-h,--help}'[Print the help]' |
| 26 | + '--legacy-paste[Inject computer clipboard text as a sequence of key events on Ctrl+v]' |
| 27 | + '--lock-video-orientation=[Lock video orientation]:orientation:(unlocked initial 0 1 2 3)' |
| 28 | + '--max-fps=[Limit the frame rate of screen capture]' |
| 29 | + {-M,--hid-mouse}'[Simulate a physical mouse by using HID over AOAv2]' |
| 30 | + {-m,--max-size=}'[Limit both the width and height of the video to value]' |
| 31 | + '--no-cleanup[Disable device cleanup actions on exit]' |
| 32 | + '--no-clipboard-autosync[Disable automatic clipboard synchronization]' |
| 33 | + '--no-downsize-on-error[Disable lowering definition on MediaCodec error]' |
| 34 | + {-n,--no-control}'[Disable device control \(mirror the device in read only\)]' |
| 35 | + {-N,--no-display}'[Do not display device \(during screen recording or when V4L2 sink is enabled\)]' |
| 36 | + '--no-key-repeat[Do not forward repeated key events when a key is held down]' |
| 37 | + '--no-mipmaps[Disable the generation of mipmaps]' |
| 38 | + '--no-power-on[Do not power on the device on start]' |
| 39 | + '--otg[Run in OTG mode \(simulating physical keyboard and mouse\)]' |
| 40 | + {-p,--port=}'[\[port\[\:port\]\] Set the TCP port \(range\) used by the client to listen]' |
| 41 | + '--power-off-on-close[Turn the device screen off when closing scrcpy]' |
| 42 | + '--prefer-text[Inject alpha characters and space as text events instead of key events]' |
| 43 | + '--print-fps[Start FPS counter, to print frame logs to the console]' |
| 44 | + '--push-target=[Set the target directory for pushing files to the device by drag and drop]' |
| 45 | + '--raw-key-events[Inject key events for all input keys, and ignore text events]' |
| 46 | + {-r,--record=}'[Record screen to file]:record file:_files' |
| 47 | + '--record-format=[Force recording format]:format:(mp4 mkv)' |
| 48 | + '--render-driver=[Request SDL to use the given render driver]:driver name:(direct3d opengl opengles2 opengles metal software)' |
| 49 | + '--rotation=[Set the initial display rotation]:rotation values:(0 1 2 3)' |
| 50 | + {-s,--serial=}'[The device serial number \(mandatory for multiple devices only\)]:serial:($("${ADB-adb}" devices | awk '\''$2 == "device" {print $1}'\''))' |
| 51 | + '--shortcut-mod=[\[key1,key2+key3,...\] Specify the modifiers to use for scrcpy shortcuts]:shortcut mod:(lctrl rctrl lalt ralt lsuper rsuper)' |
| 52 | + {-S,--turn-screen-off}'[Turn the device screen off immediately]' |
| 53 | + {-t,--show-touches}'[Show physical touches]' |
| 54 | + '--tcpip[\(optional \[ip\:port\]\) Configure and connect the device over TCP/IP]' |
| 55 | + '--tunnel-host=[Set the IP address of the adb tunnel to reach the scrcpy server]' |
| 56 | + '--tunnel-port=[Set the TCP port of the adb tunnel to reach the scrcpy server]' |
| 57 | + '--v4l2-buffer=[Add a buffering delay \(in milliseconds\) before pushing frames]' |
| 58 | + '--v4l2-sink=[\[\/dev\/videoN\] Output to v4l2loopback device]' |
| 59 | + {-V,--verbosity=}'[Set the log level]:verbosity:(verbose debug info warn error)' |
| 60 | + {-v,--version}'[Print the version of scrcpy]' |
| 61 | + {-w,--stay-awake}'[Keep the device on while scrcpy is running, when the device is plugged in]' |
| 62 | + '--window-borderless[Disable window decorations \(display borderless window\)]' |
| 63 | + '--window-title=[Set a custom window title]' |
| 64 | + '--window-x=[Set the initial window horizontal position]' |
| 65 | + '--window-y=[Set the initial window vertical position]' |
| 66 | + '--window-width=[Set the initial window width]' |
| 67 | + '--window-height=[Set the initial window height]' |
| 68 | +) |
| 69 | + |
| 70 | +_arguments -s $arguments |
0 commit comments