mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-05 13:08:29 -04:00
qs: large sweep of dead code removals
This commit is contained in:
@@ -228,22 +228,6 @@ Item {
|
||||
return ws.num !== -1 ? ws.num : ws.name;
|
||||
}
|
||||
|
||||
function escapeSwayWorkspaceName(name) {
|
||||
return String(name ?? "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
|
||||
}
|
||||
|
||||
function dispatchSwayWorkspace(ws) {
|
||||
if (!ws)
|
||||
return;
|
||||
try {
|
||||
if (ws.num !== undefined && ws.num !== -1) {
|
||||
I3.dispatch(`workspace number ${ws.num}`);
|
||||
} else if (ws.name) {
|
||||
I3.dispatch(`workspace "${escapeSwayWorkspaceName(ws.name)}"`);
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
function getSwayActiveWorkspace() {
|
||||
if (!root.screenName || SettingsData.workspaceFollowFocus) {
|
||||
const focusedWs = I3.workspaces?.values?.find(ws => ws.focused === true);
|
||||
@@ -711,7 +695,7 @@ Item {
|
||||
case "sway":
|
||||
case "scroll":
|
||||
case "miracle":
|
||||
dispatchSwayWorkspace(data);
|
||||
CompositorService.dispatchSwayWorkspace(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -818,7 +802,7 @@ Item {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatchSwayWorkspace(realWorkspaces[nextIndex]);
|
||||
CompositorService.dispatchSwayWorkspace(realWorkspaces[nextIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1486,7 +1470,7 @@ Item {
|
||||
} else if (root.isMango && modelData?.tag !== undefined) {
|
||||
MangoService.switchToTag(root.screenName, modelData.tag);
|
||||
} else if ((CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) && modelData?.num !== undefined) {
|
||||
root.dispatchSwayWorkspace(modelData);
|
||||
CompositorService.dispatchSwayWorkspace(modelData);
|
||||
}
|
||||
} else if (mouse.button === Qt.RightButton) {
|
||||
if (CompositorService.isNiri) {
|
||||
|
||||
Reference in New Issue
Block a user