mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-15 23:55:21 -04:00
mango: remove legacy dwl service
This commit is contained in:
@@ -108,8 +108,6 @@ Item {
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
const focusedWs = I3.workspaces?.values?.find(ws => ws.focused === true);
|
||||
focusedScreenName = focusedWs?.monitor?.name || "";
|
||||
} else if (CompositorService.isDwl && DwlService.activeOutput) {
|
||||
focusedScreenName = DwlService.activeOutput;
|
||||
} else if (CompositorService.isMango && MangoService.activeOutput) {
|
||||
focusedScreenName = MangoService.activeOutput;
|
||||
}
|
||||
@@ -139,8 +137,6 @@ Item {
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
const focusedWs = I3.workspaces?.values?.find(ws => ws.focused === true);
|
||||
focusedScreenName = focusedWs?.monitor?.name || "";
|
||||
} else if (CompositorService.isDwl && DwlService.activeOutput) {
|
||||
focusedScreenName = DwlService.activeOutput;
|
||||
} else if (CompositorService.isMango && MangoService.activeOutput) {
|
||||
focusedScreenName = MangoService.activeOutput;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -10,9 +10,7 @@ DankPopout {
|
||||
|
||||
property var triggerScreen: null
|
||||
|
||||
// mango shares dwl's layout model; route to the right service.
|
||||
readonly property bool isDwlLike: CompositorService.isDwl || CompositorService.isMango
|
||||
readonly property var dwlSvc: CompositorService.isMango ? MangoService : DwlService
|
||||
readonly property bool isMango: CompositorService.isMango
|
||||
|
||||
function setTriggerPosition(x, y, width, section, screen, barPosition, barThickness, barSpacing, barConfig) {
|
||||
triggerX = x;
|
||||
@@ -37,8 +35,8 @@ DankPopout {
|
||||
onScreenChanged: updateOutputState()
|
||||
|
||||
function updateOutputState() {
|
||||
if (screen && root.dwlSvc.available) {
|
||||
outputState = root.dwlSvc.getOutputState(screen.name);
|
||||
if (screen && MangoService.available) {
|
||||
outputState = MangoService.getOutputState(screen.name);
|
||||
} else {
|
||||
outputState = null;
|
||||
}
|
||||
@@ -84,7 +82,7 @@ DankPopout {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: DwlService
|
||||
target: MangoService
|
||||
function onStateChanged() {
|
||||
updateOutputState();
|
||||
}
|
||||
@@ -219,7 +217,7 @@ DankPopout {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Repeater {
|
||||
model: root.dwlSvc.layouts
|
||||
model: MangoService.layouts
|
||||
|
||||
delegate: Rectangle {
|
||||
required property string modelData
|
||||
@@ -273,11 +271,11 @@ DankPopout {
|
||||
if (!root.triggerScreen) {
|
||||
return;
|
||||
}
|
||||
if (!root.dwlSvc.available) {
|
||||
if (!MangoService.available) {
|
||||
return;
|
||||
}
|
||||
|
||||
root.dwlSvc.setLayout(root.triggerScreen.name, index);
|
||||
MangoService.setLayout(root.triggerScreen.name, index);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ Loader {
|
||||
"cpuTemp": dgopAvailable,
|
||||
"gpuTemp": dgopAvailable,
|
||||
"network_speed_monitor": dgopAvailable,
|
||||
"layout": (CompositorService.isDwl && DwlService.dwlAvailable) || (CompositorService.isMango && MangoService.available)
|
||||
"layout": CompositorService.isMango && MangoService.available
|
||||
};
|
||||
|
||||
return widgetVisibility[widgetId] ?? true;
|
||||
|
||||
@@ -13,12 +13,11 @@ BasePill {
|
||||
signal toggleLayoutPopup
|
||||
|
||||
// mango shares dwl's tag/layout model; route to the right service.
|
||||
readonly property bool isDwlLike: CompositorService.isDwl || CompositorService.isMango
|
||||
readonly property var dwlSvc: CompositorService.isMango ? MangoService : DwlService
|
||||
readonly property bool isMango: CompositorService.isMango
|
||||
|
||||
visible: layout.isDwlLike && layout.dwlSvc.available
|
||||
visible: layout.isMango && MangoService.available
|
||||
|
||||
property var outputState: parentScreen ? layout.dwlSvc.getOutputState(parentScreen.name) : null
|
||||
property var outputState: parentScreen ? MangoService.getOutputState(parentScreen.name) : null
|
||||
property string currentLayoutSymbol: outputState?.layoutSymbol || ""
|
||||
property int currentLayoutIndex: outputState?.layout || 0
|
||||
|
||||
@@ -41,9 +40,9 @@ BasePill {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: layout.dwlSvc
|
||||
target: MangoService
|
||||
function onStateChanged() {
|
||||
outputState = parentScreen ? layout.dwlSvc.getOutputState(parentScreen.name) : null;
|
||||
outputState = parentScreen ? MangoService.getOutputState(parentScreen.name) : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,13 +100,13 @@ BasePill {
|
||||
}
|
||||
|
||||
onRightClicked: {
|
||||
if (!parentScreen || !layout.dwlSvc.available || layout.dwlSvc.layouts.length === 0) {
|
||||
if (!parentScreen || !MangoService.available || MangoService.layouts.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentIndex = layout.currentLayoutIndex;
|
||||
const nextIndex = (currentIndex + 1) % layout.dwlSvc.layouts.length;
|
||||
const nextIndex = (currentIndex + 1) % MangoService.layouts.length;
|
||||
|
||||
layout.dwlSvc.setLayout(parentScreen.name, nextIndex);
|
||||
MangoService.setLayout(parentScreen.name, nextIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,8 +112,6 @@ BasePill {
|
||||
property string currentLayout: {
|
||||
if (CompositorService.isNiri) {
|
||||
return NiriService.getCurrentKeyboardLayoutName();
|
||||
} else if (CompositorService.isDwl) {
|
||||
return DwlService.currentKeyboardLayout;
|
||||
} else if (CompositorService.isMango) {
|
||||
return MangoService.currentKeyboardLayout;
|
||||
}
|
||||
@@ -209,8 +207,6 @@ BasePill {
|
||||
NiriService.cycleKeyboardLayout();
|
||||
} else if (CompositorService.isHyprland) {
|
||||
Quickshell.execDetached(["hyprctl", "switchxkblayout", root.hyprlandKeyboard, "next"]);
|
||||
} else if (CompositorService.isDwl) {
|
||||
Quickshell.execDetached(["mmsg", "dispatch", "switch_keyboard_layout"]);
|
||||
} else if (CompositorService.isMango) {
|
||||
MangoService.cycleKeyboardLayout();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ BasePill {
|
||||
}
|
||||
|
||||
IconImage {
|
||||
visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle || CompositorService.isLabwc)
|
||||
visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle || CompositorService.isLabwc)
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
@@ -66,8 +66,6 @@ BasePill {
|
||||
return "file://" + Theme.shellDir + "/assets/niri.svg";
|
||||
} else if (CompositorService.isHyprland) {
|
||||
return "file://" + Theme.shellDir + "/assets/hyprland.svg";
|
||||
} else if (CompositorService.isDwl) {
|
||||
return "file://" + Theme.shellDir + "/assets/mango.png";
|
||||
} else if (CompositorService.isMango) {
|
||||
return "file://" + Theme.shellDir + "/assets/mango.png";
|
||||
} else if (CompositorService.isSway) {
|
||||
|
||||
@@ -22,10 +22,7 @@ Item {
|
||||
property var hyprlandOverviewLoader: null
|
||||
property var parentScreen: null
|
||||
|
||||
// mango shares dwl's tag model; route to the right service so one set of
|
||||
// branches serves both.
|
||||
readonly property bool isDwlLike: CompositorService.isDwl || CompositorService.isMango
|
||||
readonly property var dwlSvc: CompositorService.isMango ? MangoService : DwlService
|
||||
readonly property bool isMango: CompositorService.isMango
|
||||
|
||||
readonly property real _leftMargin: {
|
||||
if (isVertical)
|
||||
@@ -80,9 +77,8 @@ Item {
|
||||
return NiriService.currentOutput || root.screenName;
|
||||
case "hyprland":
|
||||
return Hyprland.focusedWorkspace?.monitor?.name || root.screenName;
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return root.dwlSvc.activeOutput || root.screenName;
|
||||
return MangoService.activeOutput || root.screenName;
|
||||
case "sway":
|
||||
case "scroll":
|
||||
case "miracle":
|
||||
@@ -101,7 +97,6 @@ Item {
|
||||
switch (CompositorService.compositor) {
|
||||
case "niri":
|
||||
case "hyprland":
|
||||
case "dwl":
|
||||
case "mango":
|
||||
case "sway":
|
||||
case "scroll":
|
||||
@@ -128,7 +123,6 @@ Item {
|
||||
return getNiriActiveWorkspace();
|
||||
case "hyprland":
|
||||
return getHyprlandActiveWorkspace();
|
||||
case "dwl":
|
||||
case "mango":
|
||||
const activeTags = getDwlActiveTags();
|
||||
return activeTags.length > 0 ? activeTags[0] : -1;
|
||||
@@ -141,7 +135,7 @@ Item {
|
||||
}
|
||||
}
|
||||
property var dwlActiveTags: {
|
||||
if (root.isDwlLike) {
|
||||
if (root.isMango) {
|
||||
return getDwlActiveTags();
|
||||
}
|
||||
return [];
|
||||
@@ -160,9 +154,6 @@ Item {
|
||||
case "hyprland":
|
||||
baseList = getHyprlandWorkspaces();
|
||||
break;
|
||||
case "dwl":
|
||||
baseList = getDwlTags();
|
||||
break;
|
||||
case "mango":
|
||||
if (root.mangoOverviewActive)
|
||||
return [];
|
||||
@@ -302,7 +293,7 @@ Item {
|
||||
}
|
||||
} else if (CompositorService.isHyprland) {
|
||||
targetWorkspaceId = ws.id !== undefined ? ws.id : ws;
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
if (typeof ws !== "object" || ws.tag === undefined) {
|
||||
return [];
|
||||
}
|
||||
@@ -322,8 +313,8 @@ Item {
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
const focusedWs = I3.workspaces?.values?.find(ws => ws.focused === true);
|
||||
isActiveWs = focusedWs ? (focusedWs.num === targetWorkspaceId) : false;
|
||||
} else if (root.isDwlLike) {
|
||||
const output = root.dwlSvc.getOutputState(root.effectiveScreenName);
|
||||
} else if (root.isMango) {
|
||||
const output = MangoService.getOutputState(root.effectiveScreenName);
|
||||
if (output && output.tags) {
|
||||
const tag = output.tags.find(t => t.tag === targetWorkspaceId);
|
||||
isActiveWs = tag ? (tag.state === 1) : false;
|
||||
@@ -411,7 +402,7 @@ Item {
|
||||
"id": -1,
|
||||
"name": ""
|
||||
};
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
placeholder = {
|
||||
"tag": -1
|
||||
};
|
||||
@@ -493,11 +484,11 @@ Item {
|
||||
}
|
||||
|
||||
function getDwlTags() {
|
||||
if (!root.dwlSvc.available)
|
||||
if (!MangoService.available)
|
||||
return [];
|
||||
|
||||
const targetScreen = root.effectiveScreenName;
|
||||
const output = root.dwlSvc.getOutputState(targetScreen);
|
||||
const output = MangoService.getOutputState(targetScreen);
|
||||
if (!output || !output.tags || output.tags.length === 0)
|
||||
return [];
|
||||
|
||||
@@ -510,7 +501,7 @@ Item {
|
||||
}));
|
||||
}
|
||||
|
||||
const visibleTagIndices = root.dwlSvc.getVisibleTags(targetScreen);
|
||||
const visibleTagIndices = MangoService.getVisibleTags(targetScreen);
|
||||
return visibleTagIndices.map(tagIndex => {
|
||||
const tagData = output.tags.find(t => t.tag === tagIndex);
|
||||
return {
|
||||
@@ -523,10 +514,10 @@ Item {
|
||||
}
|
||||
|
||||
function getDwlActiveTags() {
|
||||
if (!root.dwlSvc.available)
|
||||
if (!MangoService.available)
|
||||
return [];
|
||||
|
||||
return root.dwlSvc.getActiveTags(root.effectiveScreenName);
|
||||
return MangoService.getActiveTags(root.effectiveScreenName);
|
||||
}
|
||||
|
||||
function getExtWorkspaceWorkspaces() {
|
||||
@@ -577,7 +568,7 @@ Item {
|
||||
return ws && ws.idx !== -1;
|
||||
if (CompositorService.isHyprland)
|
||||
return ws && ws.id !== -1;
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return ws && ws.tag !== -1;
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
return ws && ws.num !== -1;
|
||||
@@ -605,10 +596,9 @@ Item {
|
||||
HyprlandService.focusWorkspace(data.id);
|
||||
}
|
||||
break;
|
||||
case "dwl":
|
||||
case "mango":
|
||||
if (data.tag !== undefined)
|
||||
root.dwlSvc.switchToTag(root.screenName, data.tag);
|
||||
MangoService.switchToTag(root.screenName, data.tag);
|
||||
break;
|
||||
case "sway":
|
||||
case "scroll":
|
||||
@@ -694,7 +684,7 @@ Item {
|
||||
}
|
||||
|
||||
HyprlandService.focusWorkspace(realWorkspaces[nextIndex].id);
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
const realWorkspaces = getRealWorkspaces();
|
||||
if (realWorkspaces.length < 2) {
|
||||
return;
|
||||
@@ -708,7 +698,7 @@ Item {
|
||||
return;
|
||||
}
|
||||
|
||||
root.dwlSvc.switchToTag(root.screenName, realWorkspaces[nextIndex].tag);
|
||||
MangoService.switchToTag(root.screenName, realWorkspaces[nextIndex].tag);
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
const realWorkspaces = getRealWorkspaces();
|
||||
if (realWorkspaces.length < 2) {
|
||||
@@ -736,7 +726,7 @@ Item {
|
||||
return (modelData?.idx !== undefined && modelData?.idx !== -1) ? modelData.idx : "";
|
||||
if (CompositorService.isHyprland)
|
||||
return modelData?.id || "";
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return (modelData?.tag !== undefined) ? (modelData.tag + 1) : "";
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
return modelData?.num || "";
|
||||
@@ -751,7 +741,7 @@ Item {
|
||||
isPlaceholder = modelData?.idx === -1;
|
||||
} else if (CompositorService.isHyprland) {
|
||||
isPlaceholder = modelData?.id === -1;
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
isPlaceholder = modelData?.tag === -1;
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
isPlaceholder = modelData?.num === -1;
|
||||
@@ -786,7 +776,7 @@ Item {
|
||||
return getWorkspaceIndexFallback(modelData, index);
|
||||
}
|
||||
|
||||
readonly property bool hasNativeWorkspaceSupport: CompositorService.isNiri || CompositorService.isHyprland || root.isDwlLike || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
readonly property bool hasNativeWorkspaceSupport: CompositorService.isNiri || CompositorService.isHyprland || root.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
readonly property bool hasWorkspaces: getRealWorkspaces().length > 0
|
||||
readonly property bool shouldShow: hasNativeWorkspaceSupport || (useExtWorkspace && hasWorkspaces)
|
||||
|
||||
@@ -1051,7 +1041,7 @@ Item {
|
||||
return !!(modelData && modelData.idx === root.currentWorkspace);
|
||||
if (CompositorService.isHyprland)
|
||||
return !!(modelData && modelData.id === root.currentWorkspace);
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return !!(modelData && root.dwlActiveTags.includes(modelData.tag));
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
return !!(modelData && modelData.num === root.currentWorkspace);
|
||||
@@ -1060,7 +1050,7 @@ Item {
|
||||
property bool isOccupied: {
|
||||
if (CompositorService.isHyprland)
|
||||
return Array.from(Hyprland.toplevels?.values || []).some(tl => tl.workspace?.id === modelData?.id);
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return modelData.clients > 0;
|
||||
if (CompositorService.isNiri) {
|
||||
const workspace = NiriService.allWorkspaces.find(ws => ws.idx + 1 === modelData && ws.output === root.effectiveScreenName);
|
||||
@@ -1075,7 +1065,7 @@ Item {
|
||||
return !!(modelData && modelData.idx === -1);
|
||||
if (CompositorService.isHyprland)
|
||||
return !!(modelData && modelData.id === -1);
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return !!(modelData && modelData.tag === -1);
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
return !!(modelData && modelData.num === -1);
|
||||
@@ -1092,7 +1082,7 @@ Item {
|
||||
return modelData?.urgent ?? false;
|
||||
if (CompositorService.isNiri)
|
||||
return loadedIsUrgent;
|
||||
if (root.isDwlLike)
|
||||
if (root.isMango)
|
||||
return modelData?.state === 2;
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
return loadedIsUrgent;
|
||||
@@ -1120,7 +1110,7 @@ Item {
|
||||
targetWorkspaceId = modelData?.id;
|
||||
} else if (CompositorService.isHyprland) {
|
||||
targetWorkspaceId = modelData?.id;
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
targetWorkspaceId = modelData?.tag;
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
targetWorkspaceId = modelData?.num;
|
||||
@@ -1383,8 +1373,8 @@ Item {
|
||||
}
|
||||
} else if (CompositorService.isHyprland && modelData?.id) {
|
||||
HyprlandService.focusWorkspace(modelData.id);
|
||||
} else if (root.isDwlLike && modelData?.tag !== undefined) {
|
||||
root.dwlSvc.switchToTag(root.screenName, modelData.tag);
|
||||
} else if (root.isMango && modelData?.tag !== undefined) {
|
||||
MangoService.switchToTag(root.screenName, modelData.tag);
|
||||
} else if ((CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) && modelData?.num) {
|
||||
try {
|
||||
I3.dispatch(`workspace number ${modelData.num}`);
|
||||
@@ -1395,8 +1385,8 @@ Item {
|
||||
NiriService.toggleOverview();
|
||||
} else if (CompositorService.isHyprland && root.hyprlandOverviewLoader?.item) {
|
||||
root.hyprlandOverviewLoader.item.overviewOpen = !root.hyprlandOverviewLoader.item.overviewOpen;
|
||||
} else if (root.isDwlLike && modelData?.tag !== undefined) {
|
||||
root.dwlSvc.toggleTag(root.screenName, modelData.tag);
|
||||
} else if (root.isMango && modelData?.tag !== undefined) {
|
||||
MangoService.toggleTag(root.screenName, modelData.tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1420,7 +1410,7 @@ Item {
|
||||
wsData = modelData || null;
|
||||
} else if (CompositorService.isHyprland) {
|
||||
wsData = modelData;
|
||||
} else if (root.isDwlLike) {
|
||||
} else if (root.isMango) {
|
||||
wsData = modelData;
|
||||
} else if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
wsData = modelData;
|
||||
@@ -1434,7 +1424,7 @@ Item {
|
||||
}
|
||||
|
||||
if (SettingsData.showWorkspaceApps) {
|
||||
if (root.isDwlLike || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
if (root.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
delegateRoot.loadedIcons = root.getWorkspaceIcons(modelData);
|
||||
} else if (CompositorService.isNiri) {
|
||||
delegateRoot.loadedIcons = root.getWorkspaceIcons(isPlaceholder ? null : modelData);
|
||||
@@ -1994,8 +1984,8 @@ Item {
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: root.dwlSvc
|
||||
enabled: root.isDwlLike
|
||||
target: MangoService
|
||||
enabled: root.isMango
|
||||
function onStateChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
|
||||
@@ -67,9 +67,6 @@ Card {
|
||||
return I18n.tr("on Niri");
|
||||
if (CompositorService.isHyprland)
|
||||
return I18n.tr("on Hyprland");
|
||||
// technically they might not be on mangowc, but its what we support in the docs
|
||||
if (CompositorService.isDwl)
|
||||
return I18n.tr("on MangoWC");
|
||||
if (CompositorService.isMango)
|
||||
return I18n.tr("on MangoWC");
|
||||
if (CompositorService.isSway)
|
||||
@@ -101,9 +98,7 @@ Card {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DgopService.shortUptime
|
||||
? I18n.tr("up") + DgopService.shortUptime.slice(2)
|
||||
: I18n.tr("up")
|
||||
text: DgopService.shortUptime ? I18n.tr("up") + DgopService.shortUptime.slice(2) : I18n.tr("up")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -236,7 +236,7 @@ Item {
|
||||
}
|
||||
|
||||
IconImage {
|
||||
visible: SettingsData.dockLauncherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle || CompositorService.isLabwc)
|
||||
visible: SettingsData.dockLauncherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle || CompositorService.isLabwc)
|
||||
anchors.centerIn: parent
|
||||
width: actualIconSize + SettingsData.dockLauncherLogoSizeOffset
|
||||
height: actualIconSize + SettingsData.dockLauncherLogoSizeOffset
|
||||
@@ -247,8 +247,6 @@ Item {
|
||||
return "file://" + Theme.shellDir + "/assets/niri.svg";
|
||||
} else if (CompositorService.isHyprland) {
|
||||
return "file://" + Theme.shellDir + "/assets/hyprland.svg";
|
||||
} else if (CompositorService.isDwl) {
|
||||
return "file://" + Theme.shellDir + "/assets/mango.png";
|
||||
} else if (CompositorService.isMango) {
|
||||
return "file://" + Theme.shellDir + "/assets/mango.png";
|
||||
} else if (CompositorService.isSway) {
|
||||
|
||||
@@ -15,7 +15,7 @@ Item {
|
||||
property bool isSway: CompositorService.isSway
|
||||
property bool isScroll: CompositorService.isScroll
|
||||
property bool isMiracle: CompositorService.isMiracle
|
||||
property bool isDwl: CompositorService.isDwl || CompositorService.isMango
|
||||
property bool isMango: CompositorService.isMango
|
||||
property bool isLabwc: CompositorService.isLabwc
|
||||
|
||||
property string compositorName: {
|
||||
@@ -27,7 +27,7 @@ Item {
|
||||
return "scroll";
|
||||
if (isMiracle)
|
||||
return "miracle";
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return "mangowc";
|
||||
if (isLabwc)
|
||||
return "labwc";
|
||||
@@ -43,7 +43,7 @@ Item {
|
||||
return "/assets/sway.svg";
|
||||
if (isMiracle)
|
||||
return "/assets/miraclewm.svg";
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return "/assets/mango.png";
|
||||
if (isLabwc)
|
||||
return "/assets/labwc.png";
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
return "https://github.com/dawsers/scroll";
|
||||
if (isMiracle)
|
||||
return "https://github.com/miracle-wm-org/miracle-wm";
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return "https://github.com/DreamMaoMao/mangowc";
|
||||
if (isLabwc)
|
||||
return "https://labwc.github.io/";
|
||||
@@ -75,7 +75,7 @@ Item {
|
||||
return I18n.tr("Scroll GitHub");
|
||||
if (isMiracle)
|
||||
return I18n.tr("Scroll GitHub");
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return I18n.tr("mangowc GitHub");
|
||||
if (isLabwc)
|
||||
return I18n.tr("LabWC Website");
|
||||
@@ -88,7 +88,7 @@ Item {
|
||||
property string compositorDiscordUrl: {
|
||||
if (isHyprland)
|
||||
return "https://discord.com/invite/hQ9XvMUjjr";
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return "https://discord.gg/CPjbDxesh5";
|
||||
return "";
|
||||
}
|
||||
@@ -96,7 +96,7 @@ Item {
|
||||
property string compositorDiscordTooltip: {
|
||||
if (isHyprland)
|
||||
return I18n.tr("Hyprland Discord Server");
|
||||
if (isDwl)
|
||||
if (isMango)
|
||||
return I18n.tr("mangowc Discord Server");
|
||||
return "";
|
||||
}
|
||||
@@ -107,9 +107,9 @@ Item {
|
||||
property string ircUrl: "https://web.libera.chat/gamja/?channels=#labwc"
|
||||
property string ircTooltip: I18n.tr("LabWC IRC Channel")
|
||||
|
||||
property bool showMatrix: isNiri && !isHyprland && !isSway && !isScroll && !isMiracle && !isDwl && !isLabwc
|
||||
property bool showCompositorDiscord: isHyprland || isDwl
|
||||
property bool showReddit: isNiri && !isHyprland && !isSway && !isScroll && !isMiracle && !isDwl && !isLabwc
|
||||
property bool showMatrix: isNiri && !isHyprland && !isSway && !isScroll && !isMiracle && !isMango && !isLabwc
|
||||
property bool showCompositorDiscord: isHyprland || isMango
|
||||
property bool showReddit: isNiri && !isHyprland && !isSway && !isScroll && !isMiracle && !isMango && !isLabwc
|
||||
property bool showIrc: isLabwc
|
||||
|
||||
DankFlickable {
|
||||
|
||||
@@ -229,7 +229,7 @@ Item {
|
||||
title: I18n.tr("MangoWC Layout Overrides")
|
||||
settingKey: "mangoLayout"
|
||||
iconName: "crop_square"
|
||||
visible: CompositorService.isDwl || CompositorService.isMango
|
||||
visible: CompositorService.isMango
|
||||
|
||||
SettingsToggleRow {
|
||||
tags: ["mangowc", "mango", "gaps", "override"]
|
||||
|
||||
@@ -1023,7 +1023,6 @@ Singleton {
|
||||
return parseNiriOutputs(content);
|
||||
case "hyprland":
|
||||
return parseHyprlandOutputs(content);
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return parseMangoOutputs(content);
|
||||
default:
|
||||
@@ -1362,7 +1361,6 @@ Singleton {
|
||||
"grepPattern": "dms.outputs",
|
||||
"includeLine": "require(\"dms.outputs\")"
|
||||
};
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return {
|
||||
"configFile": configDir + "/mango/config.conf",
|
||||
@@ -1377,7 +1375,7 @@ Singleton {
|
||||
|
||||
function checkIncludeStatus() {
|
||||
const compositor = CompositorService.compositor;
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "dwl" && compositor !== "mango") {
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "mango") {
|
||||
includeStatus = {
|
||||
"exists": false,
|
||||
"included": false,
|
||||
@@ -1388,8 +1386,7 @@ Singleton {
|
||||
}
|
||||
|
||||
const filename = (compositor === "niri") ? "outputs.kdl" : ((compositor === "hyprland") ? "outputs.lua" : "outputs.conf");
|
||||
// mango and dwl both use outputs.conf under ~/.config/mango
|
||||
const compositorArg = (compositor === "dwl" || compositor === "mango") ? "mangowc" : compositor;
|
||||
const compositorArg = (compositor === "mango") ? "mangowc" : compositor;
|
||||
|
||||
checkingInclude = true;
|
||||
Proc.runCommand("check-outputs-include", ["dms", "config", "resolve-include", compositorArg, filename], (output, exitCode) => {
|
||||
@@ -1589,9 +1586,6 @@ Singleton {
|
||||
case "mango":
|
||||
MangoService.generateOutputsConfig(outputsData, finish);
|
||||
break;
|
||||
case "dwl":
|
||||
DwlService.generateOutputsConfig(outputsData, finish);
|
||||
break;
|
||||
default:
|
||||
WlrOutputService.applyOutputsConfig(outputsData, outputs);
|
||||
finish(true);
|
||||
|
||||
@@ -317,7 +317,7 @@ StyledRect {
|
||||
DankToggle {
|
||||
width: parent.width
|
||||
text: I18n.tr("Variable Refresh Rate")
|
||||
visible: root.isConnected && !root.isDisabled && !CompositorService.isDwl && !CompositorService.isMango && !CompositorService.isHyprland && !CompositorService.isNiri && (DisplayConfigState.outputs[root.outputName]?.vrr_supported ?? false)
|
||||
visible: root.isConnected && !root.isDisabled && !CompositorService.isMango && !CompositorService.isHyprland && !CompositorService.isNiri && (DisplayConfigState.outputs[root.outputName]?.vrr_supported ?? false)
|
||||
checked: {
|
||||
const pendingVrr = DisplayConfigState.getPendingValue(root.outputName, "vrr");
|
||||
if (pendingVrr !== undefined)
|
||||
|
||||
@@ -500,7 +500,7 @@ Item {
|
||||
|
||||
Column {
|
||||
id: displayFormatColumn
|
||||
visible: !CompositorService.isDwl && !CompositorService.isMango
|
||||
visible: !CompositorService.isMango
|
||||
spacing: Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
|
||||
@@ -282,8 +282,6 @@ Item {
|
||||
modes.push("niri");
|
||||
} else if (CompositorService.isHyprland) {
|
||||
modes.push("Hyprland");
|
||||
} else if (CompositorService.isDwl) {
|
||||
modes.push("mango");
|
||||
} else if (CompositorService.isMango) {
|
||||
modes.push("mango");
|
||||
} else if (CompositorService.isSway) {
|
||||
|
||||
@@ -304,8 +304,6 @@ Item {
|
||||
modes.push("niri");
|
||||
} else if (CompositorService.isHyprland) {
|
||||
modes.push("Hyprland");
|
||||
} else if (CompositorService.isDwl) {
|
||||
modes.push("mango");
|
||||
} else if (CompositorService.isMango) {
|
||||
modes.push("mango");
|
||||
} else if (CompositorService.isSway) {
|
||||
|
||||
@@ -48,7 +48,6 @@ Item {
|
||||
"grepPattern": "dms.cursor",
|
||||
"includeLine": "require(\"dms.cursor\")"
|
||||
};
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return {
|
||||
"configFile": configDir + "/mango/config.conf",
|
||||
@@ -63,7 +62,7 @@ Item {
|
||||
|
||||
function checkCursorIncludeStatus() {
|
||||
const compositor = CompositorService.compositor;
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "dwl" && compositor !== "mango") {
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "mango") {
|
||||
cursorIncludeStatus = {
|
||||
"exists": false,
|
||||
"included": false,
|
||||
@@ -74,7 +73,7 @@ Item {
|
||||
}
|
||||
|
||||
const filename = (compositor === "niri") ? "cursor.kdl" : ((compositor === "hyprland") ? "cursor.lua" : "cursor.conf");
|
||||
const compositorArg = (compositor === "dwl" || compositor === "mango") ? "mangowc" : compositor;
|
||||
const compositorArg = (compositor === "mango") ? "mangowc" : compositor;
|
||||
|
||||
checkingCursorInclude = true;
|
||||
Proc.runCommand("check-cursor-include", ["dms", "config", "resolve-include", compositorArg, filename], (output, exitCode) => {
|
||||
@@ -194,7 +193,7 @@ Item {
|
||||
themeColorsTab.templateDetection = JSON.parse(output.trim());
|
||||
} catch (e) {}
|
||||
});
|
||||
if (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango)
|
||||
if (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango)
|
||||
checkCursorIncludeStatus();
|
||||
}
|
||||
|
||||
@@ -2016,7 +2015,7 @@ Item {
|
||||
title: I18n.tr("Cursor Theme")
|
||||
settingKey: "cursorTheme"
|
||||
iconName: "mouse"
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
@@ -2181,8 +2180,6 @@ Item {
|
||||
return SettingsData.cursorSettings.niri?.hideAfterInactiveMs || 0;
|
||||
if (CompositorService.isHyprland)
|
||||
return SettingsData.cursorSettings.hyprland?.inactiveTimeout || 0;
|
||||
if (CompositorService.isDwl)
|
||||
return SettingsData.cursorSettings.dwl?.cursorHideTimeout || 0;
|
||||
if (CompositorService.isMango)
|
||||
return SettingsData.cursorSettings.mango?.cursorHideTimeout || 0;
|
||||
return 0;
|
||||
@@ -2201,10 +2198,6 @@ Item {
|
||||
if (!updated.hyprland)
|
||||
updated.hyprland = {};
|
||||
updated.hyprland.inactiveTimeout = newValue;
|
||||
} else if (CompositorService.isDwl) {
|
||||
if (!updated.dwl)
|
||||
updated.dwl = {};
|
||||
updated.dwl.cursorHideTimeout = newValue;
|
||||
} else if (CompositorService.isMango) {
|
||||
if (!updated.mango)
|
||||
updated.mango = {};
|
||||
|
||||
@@ -37,10 +37,10 @@ Item {
|
||||
{
|
||||
"id": "layout",
|
||||
"text": I18n.tr("Layout"),
|
||||
"description": I18n.tr("Display and switch DWL layouts"),
|
||||
"description": I18n.tr("Display and switch MangoWC layouts"),
|
||||
"icon": "view_quilt",
|
||||
"enabled": (CompositorService.isDwl && DwlService.dwlAvailable) || (CompositorService.isMango && MangoService.available),
|
||||
"warning": CompositorService.isMango ? (!MangoService.available ? I18n.tr("DWL service not available") : undefined) : (!CompositorService.isDwl ? I18n.tr("Requires DWL compositor") : (!DwlService.dwlAvailable ? I18n.tr("DWL service not available") : undefined))
|
||||
"enabled": CompositorService.isMango && MangoService.available,
|
||||
"warning": !CompositorService.isMango ? I18n.tr("Requires MangoWC compositor") : (!MangoService.available ? I18n.tr("Mango service not available") : undefined)
|
||||
},
|
||||
{
|
||||
"id": "launcherButton",
|
||||
|
||||
@@ -51,7 +51,7 @@ SettingsCard {
|
||||
SettingsButtonGroupRow {
|
||||
text: I18n.tr("Occupied Color")
|
||||
model: ["none", "sec", "s", "sc", "sch", "schh"]
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango
|
||||
buttonHeight: 22
|
||||
minButtonWidth: 36
|
||||
buttonPadding: Theme.spacingS
|
||||
@@ -87,7 +87,7 @@ SettingsCard {
|
||||
height: 1
|
||||
color: Theme.outline
|
||||
opacity: 0.15
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango
|
||||
}
|
||||
|
||||
SettingsButtonGroupRow {
|
||||
@@ -124,12 +124,12 @@ SettingsCard {
|
||||
height: 1
|
||||
color: Theme.outline
|
||||
opacity: 0.15
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
}
|
||||
|
||||
SettingsButtonGroupRow {
|
||||
text: I18n.tr("Urgent Color")
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
model: ["err", "pri", "sec", "s", "sc"]
|
||||
buttonHeight: 22
|
||||
minButtonWidth: 36
|
||||
|
||||
@@ -153,7 +153,7 @@ Item {
|
||||
text: I18n.tr("Follow Monitor Focus")
|
||||
description: I18n.tr("Show workspaces of the currently focused monitor")
|
||||
checked: SettingsData.workspaceFollowFocus
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle
|
||||
onToggled: checked => SettingsData.set("workspaceFollowFocus", checked)
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ Item {
|
||||
text: I18n.tr("Show All Tags")
|
||||
description: I18n.tr("Show all 9 tags instead of only occupied tags")
|
||||
checked: SettingsData.dwlShowAllTags
|
||||
visible: CompositorService.isDwl || CompositorService.isMango
|
||||
visible: CompositorService.isMango
|
||||
onToggled: checked => SettingsData.set("dwlShowAllTags", checked)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user