_scrcpy 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #compdef -N scrcpy -N scrcpy.exe
  2. #
  3. # name: scrcpy
  4. # auth: hltdev [hltdev8642@gmail.com]
  5. # desc: completion file for scrcpy (all OSes)
  6. #
  7. local arguments
  8. arguments=(
  9. '--always-on-top[Make scrcpy window always on top \(above other windows\)]'
  10. '--audio-bit-rate=[Encode the audio at the given bit-rate]'
  11. '--audio-buffer=[Configure the audio buffering delay (in milliseconds)]'
  12. '--audio-codec=[Select the audio codec]:codec:(opus aac flac raw)'
  13. '--audio-codec-options=[Set a list of comma-separated key\:type=value options for the device audio encoder]'
  14. '--audio-dup=[Duplicate audio]'
  15. '--audio-encoder=[Use a specific MediaCodec audio encoder]'
  16. '--audio-source=[Select the audio source]:source:(output mic playback)'
  17. '--audio-output-buffer=[Configure the size of the SDL audio output buffer (in milliseconds)]'
  18. {-b,--video-bit-rate=}'[Encode the video at the given bit-rate]'
  19. '--camera-ar=[Select the camera size by its aspect ratio]'
  20. '--camera-high-speed=[Enable high-speed camera capture mode]'
  21. '--camera-id=[Specify the camera id to mirror]'
  22. '--camera-facing=[Select the device camera by its facing direction]:facing:(front back external)'
  23. '--camera-fps=[Specify the camera capture frame rate]'
  24. '--camera-size=[Specify an explicit camera capture size]'
  25. '--crop=[\[width\:height\:x\:y\] Crop the device screen on the server]'
  26. {-d,--select-usb}'[Use USB device]'
  27. '--disable-screensaver[Disable screensaver while scrcpy is running]'
  28. '--display-buffer=[Add a buffering delay \(in milliseconds\) before displaying]'
  29. '--display-id=[Specify the display id to mirror]'
  30. '--display-orientation=[Set the initial display orientation]:orientation values:(0 90 180 270 flip0 flip90 flip180 flip270)'
  31. {-e,--select-tcpip}'[Use TCP/IP device]'
  32. {-f,--fullscreen}'[Start in fullscreen]'
  33. '--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
  34. '-G[Use UHID/AOA gamepad (same as --gamepad=uhid or --gamepad=aoa, depending on OTG mode)]'
  35. '--gamepad=[Set the gamepad input mode]:mode:(disabled uhid aoa)'
  36. {-h,--help}'[Print the help]'
  37. '-K[Use UHID/AOA keyboard (same as --keyboard=uhid or --keyboard=aoa, depending on OTG mode)]'
  38. '--keyboard=[Set the keyboard input mode]:mode:(disabled sdk uhid aoa)'
  39. '--kill-adb-on-close[Kill adb when scrcpy terminates]'
  40. '--legacy-paste[Inject computer clipboard text as a sequence of key events on Ctrl+v]'
  41. '--list-camera-sizes[List the valid camera capture sizes]'
  42. '--list-cameras[List cameras available on the device]'
  43. '--list-displays[List displays available on the device]'
  44. '--list-encoders[List video and audio encoders available on the device]'
  45. '--lock-video-orientation=[Lock video orientation]:orientation:(unlocked initial 0 90 180 270)'
  46. {-m,--max-size=}'[Limit both the width and height of the video to value]'
  47. '-M[Use UHID/AOA mouse (same as --mouse=uhid or --mouse=aoa, depending on OTG mode)]'
  48. '--max-fps=[Limit the frame rate of screen capture]'
  49. '--mouse=[Set the mouse input mode]:mode:(disabled sdk uhid aoa)'
  50. '--mouse-bind=[Configure bindings of secondary clicks]'
  51. {-n,--no-control}'[Disable device control \(mirror the device in read only\)]'
  52. {-N,--no-playback}'[Disable video and audio playback]'
  53. '--no-audio[Disable audio forwarding]'
  54. '--no-audio-playback[Disable audio playback]'
  55. '--no-cleanup[Disable device cleanup actions on exit]'
  56. '--no-clipboard-autosync[Disable automatic clipboard synchronization]'
  57. '--no-downsize-on-error[Disable lowering definition on MediaCodec error]'
  58. '--no-key-repeat[Do not forward repeated key events when a key is held down]'
  59. '--no-mipmaps[Disable the generation of mipmaps]'
  60. '--no-mouse-hover[Do not forward mouse hover events]'
  61. '--no-power-on[Do not power on the device on start]'
  62. '--no-video[Disable video forwarding]'
  63. '--no-video-playback[Disable video playback]'
  64. '--orientation=[Set the video orientation]:orientation values:(0 90 180 270 flip0 flip90 flip180 flip270)'
  65. '--otg[Run in OTG mode \(simulating physical keyboard and mouse\)]'
  66. {-p,--port=}'[\[port\[\:port\]\] Set the TCP port \(range\) used by the client to listen]'
  67. '--pause-on-exit=[Make scrcpy pause before exiting]:mode:(true false if-error)'
  68. '--power-off-on-close[Turn the device screen off when closing scrcpy]'
  69. '--prefer-text[Inject alpha characters and space as text events instead of key events]'
  70. '--print-fps[Start FPS counter, to print frame logs to the console]'
  71. '--push-target=[Set the target directory for pushing files to the device by drag and drop]'
  72. {-r,--record=}'[Record screen to file]:record file:_files'
  73. '--raw-key-events[Inject key events for all input keys, and ignore text events]'
  74. '--record-format=[Force recording format]:format:(mp4 mkv m4a mka opus aac flac wav)'
  75. '--record-orientation=[Set the record orientation]:orientation values:(0 90 180 270)'
  76. '--render-driver=[Request SDL to use the given render driver]:driver name:(direct3d opengl opengles2 opengles metal software)'
  77. '--require-audio=[Make scrcpy fail if audio is enabled but does not work]'
  78. {-s,--serial=}'[The device serial number \(mandatory for multiple devices only\)]:serial:($("${ADB-adb}" devices | awk '\''$2 == "device" {print $1}'\''))'
  79. {-S,--turn-screen-off}'[Turn the device screen off immediately]'
  80. '--shortcut-mod=[\[key1,key2+key3,...\] Specify the modifiers to use for scrcpy shortcuts]:shortcut mod:(lctrl rctrl lalt ralt lsuper rsuper)'
  81. {-t,--show-touches}'[Show physical touches]'
  82. '--tcpip[\(optional \[ip\:port\]\) Configure and connect the device over TCP/IP]'
  83. '--time-limit=[Set the maximum mirroring time, in seconds]'
  84. '--tunnel-host=[Set the IP address of the adb tunnel to reach the scrcpy server]'
  85. '--tunnel-port=[Set the TCP port of the adb tunnel to reach the scrcpy server]'
  86. '--v4l2-buffer=[Add a buffering delay \(in milliseconds\) before pushing frames]'
  87. '--v4l2-sink=[\[\/dev\/videoN\] Output to v4l2loopback device]'
  88. {-v,--version}'[Print the version of scrcpy]'
  89. {-V,--verbosity=}'[Set the log level]:verbosity:(verbose debug info warn error)'
  90. '--video-codec=[Select the video codec]:codec:(h264 h265 av1)'
  91. '--video-codec-options=[Set a list of comma-separated key\:type=value options for the device video encoder]'
  92. '--video-encoder=[Use a specific MediaCodec video encoder]'
  93. '--video-source=[Select the video source]:source:(display camera)'
  94. {-w,--stay-awake}'[Keep the device on while scrcpy is running, when the device is plugged in]'
  95. '--window-borderless[Disable window decorations \(display borderless window\)]'
  96. '--window-title=[Set a custom window title]'
  97. '--window-x=[Set the initial window horizontal position]'
  98. '--window-y=[Set the initial window vertical position]'
  99. '--window-width=[Set the initial window width]'
  100. '--window-height=[Set the initial window height]'
  101. )
  102. _arguments -s $arguments