quickshell: switch from hyprland dispatch exec trick to quickshell execdetached

This commit is contained in:
end-4
2025-06-21 02:51:21 +02:00
parent 29c7031bb2
commit e4be9852a3
21 changed files with 75 additions and 63 deletions
@@ -147,7 +147,7 @@ Scope {
buttonIcon: "settings"
onClicked: {
Hyprland.dispatch("global quickshell:sidebarRightClose")
Hyprland.dispatch(`exec qs -p '${root.settingsQmlPath}'`)
Quickshell.execDetached(["qs", "-p", root.settingsQmlPath])
}
StyledToolTip {
content: qsTr("Settings")
@@ -15,8 +15,8 @@ QuickToggleButton {
toggleBluetooth.running = true
}
altAction: () => {
Hyprland.dispatch(`exec ${ConfigOptions.apps.bluetooth}`)
Hyprland.dispatch("global quickshell:sidebarRightClose")
Quickshell.execDetached(["bash", "-c", `${ConfigOptions.apps.bluetooth}`])
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
Process {
id: toggleBluetooth
@@ -13,10 +13,9 @@ QuickToggleButton {
onClicked: {
enabled = !enabled
if (enabled) {
// gameModeOn.running = true
Hyprland.dispatch(`exec hyprctl --batch "keyword animations:enabled 0; keyword decoration:shadow:enabled 0; keyword decoration:blur:enabled 0; keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:border_size 1; keyword decoration:rounding 0; keyword general:allow_tearing 1"`)
Quickshell.execDetached(["bash", "-c", `hyprctl --batch "keyword animations:enabled 0; keyword decoration:shadow:enabled 0; keyword decoration:blur:enabled 0; keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:border_size 1; keyword decoration:rounding 0; keyword general:allow_tearing 1"`])
} else {
Hyprland.dispatch("exec hyprctl reload")
Quickshell.execDetached(["hyprctl", "reload"])
}
}
@@ -15,7 +15,7 @@ QuickToggleButton {
toggleNetwork.running = true
}
altAction: () => {
Hyprland.dispatch(`exec ${Network.ethernet ? ConfigOptions.apps.networkEthernet : ConfigOptions.apps.network}`)
Quickshell.execDetached(["bash", "-c", `${Network.ethernet ? ConfigOptions.apps.networkEthernet : ConfigOptions.apps.network}`])
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
Process {