use hyprland global keybind dispatch for window toggling

This commit is contained in:
end-4
2025-04-27 23:06:22 +02:00
parent 4548000077
commit 9b0d769598
13 changed files with 134 additions and 111 deletions
@@ -8,6 +8,7 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Widgets
import Quickshell.Hyprland
Button {
id: root
@@ -35,7 +36,7 @@ Button {
PointingHandInteraction {}
onClicked: {
root.itemExecute()
closeOverview.running = true
Hyprland.dispatch("global quickshell:overviewClose")
}
Keys.onPressed: (event) => {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
@@ -116,9 +117,4 @@ Button {
text: root.itemClickActionName
}
}
Process {
id: closeOverview
command: ["bash", "-c", "qs ipc call overview close &"] // Somehow has to be async to work?
}
}