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
@@ -5,6 +5,7 @@ import "root:/modules/common/widgets"
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
QuickToggleButton {
toggled: Bluetooth.bluetoothEnabled
@@ -17,17 +18,15 @@ QuickToggleButton {
toggleBluetooth.running = true
}
if (mouse.button === Qt.RightButton) {
configureBluetooth.running = true
Hyprland.dispatch(`exec ${ConfigOptions.apps.bluetooth}`)
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
}
hoverEnabled: false
propagateComposedEvents: true
cursorShape: Qt.PointingHandCursor
}
Process {
id: configureBluetooth
command: ["bash", "-c", `${ConfigOptions.apps.bluetooth} & qs ipc call sidebarRight close`]
}
Process {
id: toggleBluetooth
command: ["bash", "-c", `bluetoothctl power ${Bluetooth.bluetoothEnabled ? "off" : "on"}`]