mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-16 01:02:46 -04:00
Support Hyprland lua dispatching (#2419)
This commit is contained in:
@@ -255,7 +255,8 @@ Scope {
|
||||
}
|
||||
|
||||
const targetId = thisMonitorWorkspaceIds[targetIndex];
|
||||
Hyprland.dispatch("workspace " + targetId);
|
||||
|
||||
HyprlandService.focusWorkspace(targetId);
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ Item {
|
||||
onClicked: {
|
||||
if (root.draggingTargetWorkspace === -1) {
|
||||
root.overviewOpen = false;
|
||||
Hyprland.dispatch(`workspace ${workspaceValue}`);
|
||||
HyplandService.focusWorkspace(workspaceValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +352,7 @@ Item {
|
||||
root.draggingTargetWorkspace = -1;
|
||||
|
||||
if (targetWorkspace !== -1 && targetWorkspace !== windowData?.workspace.id) {
|
||||
Hyprland.dispatch(`movetoworkspacesilent ${targetWorkspace},address:${windowData?.address}`);
|
||||
HyprlandService.moveToWorkspace(targetWorkspace, windowData?.address, false)
|
||||
Qt.callLater(() => {
|
||||
Hyprland.refreshToplevels();
|
||||
Hyprland.refreshWorkspaces();
|
||||
@@ -372,10 +372,10 @@ Item {
|
||||
return;
|
||||
if (event.button === Qt.LeftButton) {
|
||||
root.overviewOpen = false;
|
||||
Hyprland.dispatch(`focuswindow address:${windowData.address}`);
|
||||
HyprlandService.focusWindow(windowData.address);
|
||||
event.accepted = true;
|
||||
} else if (event.button === Qt.MiddleButton) {
|
||||
Hyprland.dispatch(`closewindow address:${windowData.address}`);
|
||||
HyprlandService.closeWindow(windowData.address);
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user