forked from Shinonome/dots-hyprland
use more hyprland dispatch exec instead of a process for simple stuff
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user