From 888005f2ac338abb1eefba1a2134ef7959fd59ac Mon Sep 17 00:00:00 2001 From: Florian Egger Date: Mon, 13 Jul 2026 14:59:11 +0200 Subject: [PATCH] Replace Hyprland transform enum references with numeric constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Hyprland.Monitor.Transform enum values are not reliably accessible in this context. Using the documented numeric values (0 for NORMAL, 3 for 270° rotation) avoids runtime lookup issues and keeps the rotation logic working for both portrait and landscape modes. --- pinenote-shell/src/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pinenote-shell/src/main.js b/pinenote-shell/src/main.js index 93bdd03..f7a916a 100644 --- a/pinenote-shell/src/main.js +++ b/pinenote-shell/src/main.js @@ -61,8 +61,8 @@ class ScreenRotator { const transform = rotation === "landscape" - ? Hyprland.Monitor.Transform.NORMAL - : Hyprland.Monitor.Transform.ROTATE_270_DEG + ? 0 // Hyprland transform: NORMAL + : 3 // Hyprland transform: ROTATE_270_DEG (portrait) // Hyprland expects keyword monitor ,transform, await execAsync([ @@ -231,7 +231,7 @@ function PinenoteShell() { const monitor = focusedMonitor() if (!monitor) return "auto" const t = monitor.transform - return t === Hyprland.Monitor.Transform.NORMAL ? "landscape" : "portrait" + return t === 0 ? "landscape" : "portrait" }) const status = createComputed(() => `Rotation: ${transform()} | Brightness: ${brightnessLevel()}%`)