use more hyprland dispatch exec instead of a process for simple stuff

This commit is contained in:
end-4
2025-04-27 23:22:27 +02:00
parent 9b0d769598
commit ab9b17a188
6 changed files with 17 additions and 48 deletions
@@ -9,6 +9,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
Item { // Wrapper
id: root
@@ -85,16 +86,6 @@ Item { // Wrapper
}
}
Process {
id: copyText
property list<string> baseCommand: ["wl-copy"]
function copyTextToClipboard(text) {
copyText.running = false
copyText.command = baseCommand.concat(text)
copyText.running = true
}
}
Process {
id: webSearch
property list<string> baseCommand: ["xdg-open"]
@@ -338,7 +329,7 @@ Item { // Wrapper
fontType: "monospace",
materialSymbol: 'calculate',
execute: () => {
copyText.copyTextToClipboard(root.mathResult);
Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`)
}
});
// Run command