1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

clipboard: add cl copy --download option for images/videos

- offers application/vnd.portal.filetransfer and text/uri-list
This commit is contained in:
bbedward
2026-01-26 16:34:47 -05:00
parent 2263338878
commit 2a02d5594c
6 changed files with 442 additions and 6 deletions

View File

@@ -65,6 +65,12 @@ Item {
running: false
}
Process {
id: copyProcess
running: false
onExited: pasteTimer.start()
}
Timer {
id: pasteTimer
interval: 200
@@ -83,12 +89,12 @@ Item {
const pluginId = selectedItem.pluginId;
if (!pluginId)
return;
const pasteText = AppSearchService.getPluginPasteText(pluginId, selectedItem.data);
if (!pasteText)
const pasteArgs = AppSearchService.getPluginPasteArgs(pluginId, selectedItem.data);
if (!pasteArgs)
return;
Quickshell.execDetached(["dms", "cl", "copy", pasteText]);
copyProcess.command = pasteArgs;
copyProcess.running = true;
itemExecuted();
pasteTimer.start();
}
readonly property var sectionDefinitions: [