1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 21:48:30 -04:00

display config: fix mixed ID/model identifiers

fixes #2736
This commit is contained in:
bbedward
2026-07-04 13:24:53 -04:00
parent e7bd8e4002
commit 65c4167ab2
4 changed files with 32 additions and 10 deletions
+5 -1
View File
@@ -1437,6 +1437,8 @@ window-rule {
}
function getOutputIdentifier(output, outputName) {
if (output.explicitIdentifier)
return outputName;
if (SettingsData.displayNameMode === "model" && output.make && output.model) {
const serial = output.serial || "Unknown";
return output.make + " " + output.model + " " + serial;
@@ -1490,7 +1492,9 @@ window-rule {
continue;
}
if (output.current_mode !== undefined && output.modes && output.modes[output.current_mode]) {
if (output.configured_mode) {
kdlContent += ` mode "${output.configured_mode}"\n`;
} else if (output.current_mode !== undefined && output.modes && output.modes[output.current_mode]) {
const mode = output.modes[output.current_mode];
kdlContent += ` mode "${mode.width}x${mode.height}@${(mode.refresh_rate / 1000).toFixed(3)}"\n`;
}