From d819865853ff5cf40a8b60d6d14eaed929971685 Mon Sep 17 00:00:00 2001 From: Paul <132834322+Stodtyy@users.noreply.github.com> Date: Thu, 28 May 2026 23:26:14 +0200 Subject: [PATCH] fix: Display Configurator in Hyprland (#2506) * fix: display configurator * fix: replace --- .../DisplayConfig/DisplayConfigState.qml | 16 ++++++++++------ quickshell/Services/HyprlandService.qml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/quickshell/Modules/Settings/DisplayConfig/DisplayConfigState.qml b/quickshell/Modules/Settings/DisplayConfig/DisplayConfigState.qml index 378ab337..ed9003f7 100644 --- a/quickshell/Modules/Settings/DisplayConfig/DisplayConfigState.qml +++ b/quickshell/Modules/Settings/DisplayConfig/DisplayConfigState.qml @@ -997,6 +997,8 @@ Singleton { const id = (o.make + " " + o.model + " " + serial).trim(); liveByIdentifier[id] = true; liveByIdentifier[o.make + " " + o.model] = true; + if (CompositorService.isHyprland) + liveByIdentifier[getHyprlandOutputIdentifier(o, name)] = true; } liveByIdentifier[name] = true; } @@ -1132,11 +1134,13 @@ Singleton { "scale": typeof scaleValue === "number" ? scaleValue : 1.0, "transform": hyprlandToTransform(transform) }, - "modes": modeMatch ? [{ - "width": parseInt(modeMatch[1]), - "height": parseInt(modeMatch[2]), - "refresh_rate": Math.round(parseFloat(modeMatch[3]) * 1000) - }] : [], + "modes": modeMatch ? [ + { + "width": parseInt(modeMatch[1]), + "height": parseInt(modeMatch[2]), + "refresh_rate": Math.round(parseFloat(modeMatch[3]) * 1000) + } + ] : [], "current_mode": modeMatch ? 0 : -1, "vrr_enabled": vrrMode >= 1, "vrr_supported": vrrMode > 0, @@ -1666,7 +1670,7 @@ Singleton { function getHyprlandOutputIdentifier(output, outputName) { 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; } diff --git a/quickshell/Services/HyprlandService.qml b/quickshell/Services/HyprlandService.qml index f10088ea..080ddd49 100644 --- a/quickshell/Services/HyprlandService.qml +++ b/quickshell/Services/HyprlandService.qml @@ -58,7 +58,7 @@ Singleton { function getOutputIdentifier(output, outputName) { 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; }