Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture and enhances core capabilities through extension components. In a WSL (Windows Subsystem for Linux) environment, developers often need to interact with Windows desktop applications from a Linux terminal, such as resizing windows, activating specific applications, or performing automated operations. The dsh-wsl-winctl plugin is designed to solve this pain point, allowing users to communicate directly with top-level Windows windows through the DSH command line.
Plugin Purpose¶
This is a DeepSeek Harness plugin maintained by user 173787247. Its core function is to provide a set of APIs that enable WSL to enumerate top-level Windows windows and perform operations on them, such as activation, minimization, restoration, moving, and resizing. It does not rely on a complex desktop environment but interacts directly with the Windows window manager.
Core Features¶
The plugin provides the following operational capabilities:
- Window Enumeration: List top-level Windows windows in the current system.
- Window Control: Perform activation, minimization, and restoration operations.
- Window Moving and Resizing: Move a window or adjust its size by specifying coordinates and dimensions.
Installation and Enabling¶
Before installation, ensure your environment meets the following conditions:
* A WSL environment running on Windows.
* DeepSeek Harness is already running in that environment.
* Accessible PowerShell is available in the system path.
Run the following command to install the plugin:
dsh plugin --profile web add github:173787247/dsh-wsl-winctl
Typical Usage¶
After installation, the following functions can be invoked through the win_windows command:
1. List all current windows
win_windows action=windows
2. Activate the window containing a specific title
This operation uses fuzzy matching on the window title rather than relying on the current focus.
win_windows action=activate titleContains="Notepad"
3. Move and resize the window
The move operation must specify both position (x, y) and dimensions (width, height). If only the position is specified or the dimensions are incomplete, the operation will be rejected.
win_windows action=move pid=1234 x=0 y=0 width=1280 height=800
Notes¶
- Target Specification Mechanism: The plugin requires every operation to explicitly specify a target. A window can be located only by
pid(process ID) ortitleContains(title contains keyword). The plugin does not act on the currently focused window. - Move Operation Completeness: The
moveoperation rejects “half-guessing” execution. If dimensions are not provided or are negative, the command will fail immediately, requiring the user to provide complete position values and positive dimensions. - Compatibility: This plugin version is 0.1.0 and requires DeepSeek Harness version 0.1.2 or higher.
Brief Closing¶
This plugin provides WSL users with a standardized window control interface, suitable for scenarios that require automated desktop interaction or managing Windows applications from a Linux environment. Its MIT license permits free use and modification. Refer to its GitHub repository for source code and more compatibility details.