Tools & Capabilities

dsh-plugin-drone

initialencounter/dsh-plugin-drone · ★ 1

initialencounter

Drag files or floders from explorer into dsh smoothly

License
AGPL-3.0
Added
2026-08-23
Maintenance
active
Install kind
github
npm
dsh-plugin-drone

No manifest check is available; listing does not imply compatibility or security review.

安装

dsh plugin --profile web add github:initialencounter/dsh-plugin-drone

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. Install
  2. Features
  3. How it works
  4. Events
  5. Services
  6. Usage
  7. Requirements
  8. LICENSE

English | 中文

npm version

Smoothly drag files / folders from Windows Explorer into dsh.

When you press the left mouse button in Explorer and drag files out, the plugin captures the drag through a native binding and broadcasts the dragged paths to the dsh context as a flextrek-drag event, so other modules can pick them up for further processing (for example, adding them to the current session's context).

Install

dsh plugin --profile web add dsh-plugin-drone

Features

  • Listens for files / folders dragged out of Windows Explorer (fires on drag, no hotkey needed)
  • The drag event carries an array of absolute paths of the dragged items
  • Registered as a flextrek service whose lifecycle is managed by cordis; the listener is unregistered automatically on dispose

How it works

The plugin is built on dsh's cordis framework and consists of two parts:

  • Drone (plugin entry): mounts the FlextreckService service on load.
  • FlextreckService (service): calls listenExplorerDragFiles from @initencounter/flextrek to register a global drag listener; whenever files are dragged out of Explorer, it emits ctx.emit('flextrek-drag', files). The listener is unregistered when the service is dispose()d.

The underlying @initencounter/flextrek is a Windows binding built on the flextrek-rs Rust crate, so it is Windows x64 only.

Events

Event Payload Description
flextrek-drag string[] Absolute paths of the files / folders dragged out of Explorer

Services

Service Description
flextrek Holds the drag listener; unregisters all handles on dispose()

Usage

Subscribe to the event in dsh to consume drag results, for example:

ctx.on('flextrek-drag', (files) => {
  console.log('Dragged files:', files)
})

Requirements

  • Windows x64 (the flextrek native binding currently supports win32-x64-msvc only)
  • Node.js runtime

LICENSE

AGPL-3.0