1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-07 19:59:14 -04:00

fix: Display Configurator in Hyprland (#2506)

* fix: display configurator

* fix: replace
This commit is contained in:
Paul
2026-05-28 23:26:14 +02:00
committed by GitHub
parent 38176ab543
commit d819865853
2 changed files with 11 additions and 7 deletions
@@ -997,6 +997,8 @@ Singleton {
const id = (o.make + " " + o.model + " " + serial).trim(); const id = (o.make + " " + o.model + " " + serial).trim();
liveByIdentifier[id] = true; liveByIdentifier[id] = true;
liveByIdentifier[o.make + " " + o.model] = true; liveByIdentifier[o.make + " " + o.model] = true;
if (CompositorService.isHyprland)
liveByIdentifier[getHyprlandOutputIdentifier(o, name)] = true;
} }
liveByIdentifier[name] = true; liveByIdentifier[name] = true;
} }
@@ -1132,11 +1134,13 @@ Singleton {
"scale": typeof scaleValue === "number" ? scaleValue : 1.0, "scale": typeof scaleValue === "number" ? scaleValue : 1.0,
"transform": hyprlandToTransform(transform) "transform": hyprlandToTransform(transform)
}, },
"modes": modeMatch ? [{ "modes": modeMatch ? [
{
"width": parseInt(modeMatch[1]), "width": parseInt(modeMatch[1]),
"height": parseInt(modeMatch[2]), "height": parseInt(modeMatch[2]),
"refresh_rate": Math.round(parseFloat(modeMatch[3]) * 1000) "refresh_rate": Math.round(parseFloat(modeMatch[3]) * 1000)
}] : [], }
] : [],
"current_mode": modeMatch ? 0 : -1, "current_mode": modeMatch ? 0 : -1,
"vrr_enabled": vrrMode >= 1, "vrr_enabled": vrrMode >= 1,
"vrr_supported": vrrMode > 0, "vrr_supported": vrrMode > 0,
@@ -1666,7 +1670,7 @@ Singleton {
function getHyprlandOutputIdentifier(output, outputName) { function getHyprlandOutputIdentifier(output, outputName) {
if (SettingsData.displayNameMode === "model" && output?.make && output?.model) if (SettingsData.displayNameMode === "model" && output?.make && output?.model)
return "desc:" + output.make + " " + output.model + " " + (output?.serial || "Unknown"); return ("desc:" + output.make + " " + output.model + " " + (output?.serial || "Unknown")).replace(/,/g, "");
return outputName; return outputName;
} }
+1 -1
View File
@@ -58,7 +58,7 @@ Singleton {
function getOutputIdentifier(output, outputName) { function getOutputIdentifier(output, outputName) {
if (SettingsData.displayNameMode === "model" && output.make && output.model) if (SettingsData.displayNameMode === "model" && output.make && output.model)
return "desc:" + output.make + " " + output.model + " " + (output.serial || "Unknown"); return ("desc:" + output.make + " " + output.model + " " + (output.serial || "Unknown")).replace(/,/g, "");
return outputName; return outputName;
} }