mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat(mango): first-class MangoWM support across DMS, dankinstaller & UI tools
- Bring up Mango to parity with niri/hyprland via a native JSON-IPC w/Native MangoServic., replaces the legacy dwl/`mmsg` path and recent breaking changes - Dankinstall: mango supported installer, config/binds templates, and packaging (Arch AUR, Fedora Terra auto-enable, Gentoo GURU) - Window rules: Go provider + CLI + Settings GUI editor - Keybinds + config reload on edit (mmsg dispatch reload_config) - Misc new supported options in DMS settings
This commit is contained in:
@@ -158,12 +158,14 @@ Singleton {
|
||||
const compositorDirs = {
|
||||
"niri": configDir + "/niri/dms/profiles",
|
||||
"hyprland": configDir + "/hypr/dms/profiles",
|
||||
"dwl": configDir + "/mango/dms/profiles"
|
||||
"dwl": configDir + "/mango/dms/profiles",
|
||||
"mango": configDir + "/mango/dms/profiles"
|
||||
};
|
||||
const compositorExts = {
|
||||
"niri": ".kdl",
|
||||
"hyprland": ".conf",
|
||||
"dwl": ".conf"
|
||||
"dwl": ".conf",
|
||||
"mango": ".conf"
|
||||
};
|
||||
|
||||
const tasks = [];
|
||||
@@ -542,6 +544,14 @@ Singleton {
|
||||
onWriteFailed();
|
||||
});
|
||||
break;
|
||||
case "mango":
|
||||
MangoService.generateOutputsConfig(outputsData, success => {
|
||||
if (success)
|
||||
onWriteSuccess();
|
||||
else
|
||||
onWriteFailed();
|
||||
});
|
||||
break;
|
||||
case "dwl":
|
||||
DwlService.generateOutputsConfig(outputsData, success => {
|
||||
if (success)
|
||||
@@ -1032,6 +1042,7 @@ Singleton {
|
||||
case "hyprland":
|
||||
return parseHyprlandOutputs(content);
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return parseMangoOutputs(content);
|
||||
default:
|
||||
return {};
|
||||
@@ -1302,7 +1313,7 @@ Singleton {
|
||||
params[pair.substring(0, colonIdx).trim()] = pair.substring(colonIdx + 1).trim();
|
||||
}
|
||||
|
||||
const name = params.name;
|
||||
const name = (params.name || "").replace(/^\^/, "").replace(/\$$/, "");
|
||||
if (!name)
|
||||
continue;
|
||||
|
||||
@@ -1370,6 +1381,7 @@ Singleton {
|
||||
"includeLine": "require(\"dms.outputs\")"
|
||||
};
|
||||
case "dwl":
|
||||
case "mango":
|
||||
return {
|
||||
"configFile": configDir + "/mango/config.conf",
|
||||
"outputsFile": configDir + "/mango/dms/outputs.conf",
|
||||
@@ -1383,7 +1395,7 @@ Singleton {
|
||||
|
||||
function checkIncludeStatus() {
|
||||
const compositor = CompositorService.compositor;
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "dwl") {
|
||||
if (compositor !== "niri" && compositor !== "hyprland" && compositor !== "dwl" && compositor !== "mango") {
|
||||
includeStatus = {
|
||||
"exists": false,
|
||||
"included": false,
|
||||
@@ -1394,7 +1406,8 @@ Singleton {
|
||||
}
|
||||
|
||||
const filename = (compositor === "niri") ? "outputs.kdl" : ((compositor === "hyprland") ? "outputs.lua" : "outputs.conf");
|
||||
const compositorArg = (compositor === "dwl") ? "mangowc" : compositor;
|
||||
// mango and dwl both use outputs.conf under ~/.config/mango
|
||||
const compositorArg = (compositor === "dwl" || compositor === "mango") ? "mangowc" : compositor;
|
||||
|
||||
checkingInclude = true;
|
||||
Proc.runCommand("check-outputs-include", ["dms", "config", "resolve-include", compositorArg, filename], (output, exitCode) => {
|
||||
@@ -1569,6 +1582,9 @@ Singleton {
|
||||
}
|
||||
HyprlandService.generateOutputsConfig(outputsData, buildMergedHyprlandSettings());
|
||||
break;
|
||||
case "mango":
|
||||
MangoService.generateOutputsConfig(outputsData);
|
||||
break;
|
||||
case "dwl":
|
||||
DwlService.generateOutputsConfig(outputsData);
|
||||
break;
|
||||
|
||||
@@ -317,7 +317,7 @@ StyledRect {
|
||||
DankToggle {
|
||||
width: parent.width
|
||||
text: I18n.tr("Variable Refresh Rate")
|
||||
visible: root.isConnected && !root.isDisabled && !CompositorService.isDwl && !CompositorService.isHyprland && !CompositorService.isNiri && (DisplayConfigState.outputs[root.outputName]?.vrr_supported ?? false)
|
||||
visible: root.isConnected && !root.isDisabled && !CompositorService.isDwl && !CompositorService.isMango && !CompositorService.isHyprland && !CompositorService.isNiri && (DisplayConfigState.outputs[root.outputName]?.vrr_supported ?? false)
|
||||
checked: {
|
||||
const pendingVrr = DisplayConfigState.getPendingValue(root.outputName, "vrr");
|
||||
if (pendingVrr !== undefined)
|
||||
|
||||
Reference in New Issue
Block a user