qs: hyprland dispatcher fixes

This commit is contained in:
end-4
2026-05-12 07:24:29 +02:00
parent 7aa9e603d5
commit a23d050df5
2 changed files with 5 additions and 5 deletions
@@ -230,7 +230,7 @@ HBarWidgetWithPopout {
materialSymbol: toFloat ? "picture_in_picture_center" : "side_navigation" materialSymbol: toFloat ? "picture_in_picture_center" : "side_navigation"
text: toFloat ? Translation.tr("Float") : Translation.tr("Tile") text: toFloat ? Translation.tr("Float") : Translation.tr("Tile")
onClicked: { onClicked: {
Hyprland.dispatch(`togglefloating address:${root.activeHyprlandClient.address}`) Hyprland.dispatch(`hl.dsp.window.float({action = "toggle", window = {address=${root.activeHyprlandClient.address}}})`)
HyprlandData.updateWindowList() HyprlandData.updateWindowList()
} }
} }
@@ -244,7 +244,7 @@ HBarWidgetWithPopout {
colBackground: Appearance.colors.colError colBackground: Appearance.colors.colError
colForeground: Appearance.colors.colOnError colForeground: Appearance.colors.colOnError
onClicked: { onClicked: {
Hyprland.dispatch(`killwindow address:${root.activeHyprlandClient.address}`) Hyprland.dispatch(`hl.dsp.window.kill({window = {address=${root.activeHyprlandClient.address}}})`)
HyprlandData.updateWindowList() HyprlandData.updateWindowList()
} }
} }
@@ -62,7 +62,7 @@ HBarWidgetContainer {
} }
function switchWorkspaceToHovered() { function switchWorkspaceToHovered() {
Hyprland.dispatch(`workspace ${wsModel.getWorkspaceIdAt(hoverIndex)}`) Hyprland.dispatch(`hl.dsp.focus({workspace = ${wsModel.getWorkspaceIdAt(hoverIndex)}})`)
} }
onPressed: (mouse) => { onPressed: (mouse) => {
if (mouse.button == Qt.LeftButton) if (mouse.button == Qt.LeftButton)
@@ -72,9 +72,9 @@ HBarWidgetContainer {
} }
onWheel: (event) => { onWheel: (event) => {
if (event.angleDelta.y < 0) if (event.angleDelta.y < 0)
Hyprland.dispatch(`workspace r+1`); Hyprland.dispatch(`hl.dsp.focus({workspace = "r+1"})`);
else if (event.angleDelta.y > 0) else if (event.angleDelta.y > 0)
Hyprland.dispatch(`workspace r-1`); Hyprland.dispatch(`hl.dsp.focus({workspace = "r-1"})`);
} }
// Indications // Indications