crabnebula-dev / drag-rs

Draggable for GUI apps
https://crabnebula.dev
Apache License 2.0
66 stars 11 forks source link

Execute other commands after dragging #9

Closed Vzz1c closed 9 months ago

Vzz1c commented 10 months ago

I hope to add a custom command to be executed after dragging. It can be any system command instead of just copying the file to the path. This will greatly improve the degree of freedom. For example, if I want to create a shortcut to the dragged file, I may need to first Create this shortcut method locally. After dragging, I still need to manually delete the temporarily created shortcut. The premise of these operations is that I need to obtain the target path first, but there seems to be no relevant API provided at present. At some point, a file drag operation may require movement.

denjell-crabnebula commented 10 months ago

Yes, callbacks are intended to be added in a next step. Thanks for your feedback!

lucasfernog-crabnebula commented 9 months ago

I believe #16 provides the callback you need.