1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-11 16:22:09 -04:00

meta: support async launcher plugins, cached GIFs, paste on launcher v2

action
- Preparations for DankGifSearch plugin
This commit is contained in:
bbedward
2026-01-23 12:02:12 -05:00
parent 808ee66e11
commit 972fc534a4
8 changed files with 141 additions and 34 deletions

View File

@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import qs.Common
import qs.Services
import "Scorer.js" as Scorer
@@ -41,6 +42,47 @@ Item {
}
}
Connections {
target: PluginService
function onRequestLauncherUpdate(pluginId) {
if (activePluginId === pluginId || searchQuery) {
performSearch();
}
}
}
Process {
id: wtypeProcess
command: ["wtype", "-M", "ctrl", "-P", "v", "-p", "v", "-m", "ctrl"]
running: false
}
Timer {
id: pasteTimer
interval: 200
repeat: false
onTriggered: wtypeProcess.running = true
}
function pasteSelected() {
if (!selectedItem)
return;
if (!SessionService.wtypeAvailable) {
ToastService.showError("wtype not available - install wtype for paste support");
return;
}
const pluginId = selectedItem.pluginId;
if (!pluginId)
return;
const pasteText = AppSearchService.getPluginPasteText(pluginId, selectedItem.data);
if (!pasteText)
return;
Quickshell.execDetached(["dms", "cl", "copy", pasteText]);
itemExecuted();
pasteTimer.start();
}
readonly property var sectionDefinitions: [
{
id: "calculator",