Genymobile / Genymobile/scrcpy
Assign custom name for virtual display
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
- [X] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.
**Is your feature request related to a problem? Please describe.**
Add new option to assign custom name for virtual display.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
As of now, the name is hard-coded to "scrcpy". If we query the displays from `android.hardware.display.DisplayManager.getDisplays()`, `android.view.Display.getName()` will always return "scrcpy".
https://github.com/Genymobile/scrcpy/blob/2926c06c5dc3064ae6d8db706f1a98a37cfcf3f0/server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java#L134
Introducing a new option like --display-name or alike and use that value to name the display might do the job.
If this is introduced, anyone can reference the display easily later from their app. As of now it's hard to reference which is the screen we start since they share the same name.
e.g Automation App like Automate can react and interact with multiple displays. Tasker and Macrodroid can as well via Java code.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
Another alternative is to inherit from --window-title.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java at the referenced display creation code, then trace how command-line options reach the server. Check Android's DisplayManager.getDisplays() and Display.getName() behavior. Done means a new display-name option produces the requested name for the virtual display, while the existing default remains compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100