1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-15 15:45:20 -04:00

mango: remove legacy dwl service

This commit is contained in:
bbedward
2026-06-10 17:01:03 -04:00
parent 35255e4053
commit 12438d63c2
45 changed files with 261 additions and 3185 deletions
+10 -11
View File
@@ -29,7 +29,6 @@ Item {
readonly property real _frameEdgeFloorInset: (SettingsData.frameEnabled && _usesFrameBarChrome) ? Math.max(0, SettingsData.frameThickness - _edgeBaseMargin) : 0
readonly property bool _barIsVertical: _hasBarWindow ? barWindow.isVertical : false
readonly property string _barScreenName: _hasBarWindow ? (barWindow.screenName || "") : ""
readonly property var dwlSvc: CompositorService.isMango ? MangoService : DwlService
readonly property bool hasAdjacentTopBarLive: _hasBarWindow && barWindow.hasAdjacentTopBar
readonly property bool hasAdjacentBottomBarLive: _hasBarWindow && barWindow.hasAdjacentBottomBar
readonly property bool hasAdjacentLeftBarLive: _hasBarWindow && barWindow.hasAdjacentLeftBar
@@ -190,16 +189,16 @@ Item {
}
return monitorWorkspaces.sort((a, b) => a.id - b.id);
} else if (CompositorService.isDwl || CompositorService.isMango) {
if (!dwlSvc.available) {
} else if (CompositorService.isMango) {
if (!MangoService.available) {
return [0];
}
if (SettingsData.dwlShowAllTags) {
return Array.from({
length: dwlSvc.tagCount
length: MangoService.tagCount
}, (_, i) => i);
}
return dwlSvc.getVisibleTags(screenName);
return MangoService.getVisibleTags(screenName);
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
const workspaces = I3.workspaces?.values || [];
if (workspaces.length === 0)
@@ -235,13 +234,13 @@ Item {
const monitors = Hyprland.monitors?.values || [];
const currentMonitor = monitors.find(monitor => monitor.name === screenName);
return currentMonitor?.activeWorkspace?.id ?? 1;
} else if (CompositorService.isDwl || CompositorService.isMango) {
if (!dwlSvc.available)
} else if (CompositorService.isMango) {
if (!MangoService.available)
return 0;
const outputState = dwlSvc.getOutputState(screenName);
const outputState = MangoService.getOutputState(screenName);
if (!outputState || !outputState.tags)
return 0;
const activeTags = dwlSvc.getActiveTags(screenName);
const activeTags = MangoService.getActiveTags(screenName);
return activeTags.length > 0 ? activeTags[0] : 0;
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
if (!screenName || SettingsData.workspaceFollowFocus) {
@@ -283,14 +282,14 @@ Item {
if (nextIndex !== validIndex) {
HyprlandService.focusWorkspace(realWorkspaces[nextIndex].id);
}
} else if (CompositorService.isDwl || CompositorService.isMango) {
} else if (CompositorService.isMango) {
const currentTag = getCurrentWorkspace();
const currentIndex = realWorkspaces.findIndex(tag => tag === currentTag);
const validIndex = currentIndex === -1 ? 0 : currentIndex;
const nextIndex = direction > 0 ? Math.min(validIndex + 1, realWorkspaces.length - 1) : Math.max(validIndex - 1, 0);
if (nextIndex !== validIndex) {
dwlSvc.switchToTag(_barScreenName, realWorkspaces[nextIndex]);
MangoService.switchToTag(_barScreenName, realWorkspaces[nextIndex]);
}
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
const currentWs = getCurrentWorkspace();