Where Are Window Modules Located in the escrcpy Project?

The window modules in escrcpy are located under desktop/electron/modules/, where each feature provides its own window.js implementation file.

escrcpy is an open-source Electron application that provides a GUI for scrcpy. According to the viarotel-org/escrcpy source code and AGENTS.md documentation, window modules live under the desktop/electron/modules/ directory, following a consistent pattern where each functional area contains its own window implementation.

Window Module Directory Structure

The Base Directory

The canonical location for all browser window implementations is desktop/electron/modules/. As documented in the project's AGENTS.md guide, "Window modules live under desktop/electron/modules/" according to the viarotel-org/escrcpy source code.

Feature-Specific Subdirectories

Within the base directory, each feature maintains its own subdirectory containing a window.js file:

Entry Point and Registration

The main entry point at desktop/electron/modules/index.js registers these modules and exports their window creation functions to the rest of the application.

Importing Window Modules in Code

When working with the escrcpy source, you import specific window creators from these paths using standard Node.js require() statements.

Opening the Control Window

const { createWindow: createControlWindow } = require('./desktop/electron/modules/control/window');

createControlWindow();

Opening the Explorer Window

const { createWindow: createExplorerWindow } = require('./desktop/electron/modules/explorer/window');

createExplorerWindow();

Opening the Terminal Window

const { createWindow: createTerminalWindow } = require('./desktop/electron/modules/terminal/window');

createTerminalWindow();

Adjust the relative path based on your file's location within the project structure.

Summary

  • escrcpy window modules are centralized under desktop/electron/modules/.
  • Each feature (control, explorer, terminal) implements its window logic in a dedicated window.js file.
  • The index.js file serves as the registry for all window modules.
  • Import patterns use standard Node.js require() statements pointing to the specific feature's window.js.

Frequently Asked Questions

What is the exact path for escrcpy window modules?

They are located at desktop/electron/modules/ in the repository root. Each subdirectory represents a specific feature and contains a window.js file responsible for that feature's Electron window creation.

How do I register a new window module in escrcpy?

Add your feature directory under desktop/electron/modules/ with a window.js export, then register it in desktop/electron/modules/index.js according to the existing pattern used for control, explorer, and terminal modules.

Can I customize existing window modules?

Yes. Each window.js file (such as control/window.js) exports window creation functions that you can modify to adjust window properties, preload scripts, or browser preferences.

Are window modules available in the renderer process?

Window modules are typically required by the main process to create BrowserWindow instances. The renderer process communicates with these windows via IPC, but the module files themselves reside in the main process context under desktop/electron/modules/.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →