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
+3 -14
View File
@@ -4,6 +4,7 @@ import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
Rectangle {
Layout.alignment: Qt.AlignVCenter
@@ -12,18 +13,6 @@ Rectangle {
color: Appearance.colors.colLayer1
radius: Appearance.rounding.small
Process {
id: screenSnip
command: ["grimblast", "copy", "area"]
}
Process {
id: pickColor
command: ["hyprpicker", "-a"]
}
RowLayout {
id: rowLayout
@@ -32,7 +21,7 @@ Rectangle {
SmallCircleButton {
Layout.alignment: Qt.AlignVCenter
onClicked: screenSnip.running = true
onClicked: Hyprland.dispatch("exec grimblast copy area")
MaterialSymbol {
anchors.centerIn: parent
@@ -45,7 +34,7 @@ Rectangle {
SmallCircleButton {
Layout.alignment: Qt.AlignVCenter
onClicked: pickColor.running = true
onClicked: Hyprland.dispatch("exec hyprpicker -a")
MaterialSymbol {
anchors.centerIn: parent