diff --git a/home/ags/files/app.ts b/home/ags/files/app.ts index bf9b4aa..1d896d2 100644 --- a/home/ags/files/app.ts +++ b/home/ags/files/app.ts @@ -8,10 +8,13 @@ const hyprland = Hyprland.get_default(); function find_main_monitor(): Hyprland.Monitor { let monitors = hyprland.get_monitors() - for (let i = 0; i < monitors.length; i++) { + for (let j = 0; j < monitors.length; j++) { for (const monitor of ["eDP", "DP", "HDMI-A"]) { - if (monitors[i].get_name() == monitor + "-" + i) { - return monitors[i] + for (let i = 0; i < monitors.length; i++) { + console.log("Checking monitor:", monitors[i].get_name(), "against", monitor + "-" + j) + if (monitors[i].get_name() == monitor + "-" + j) { + return monitors[i] + } } } } diff --git a/home/ags/flake.lock b/home/ags/flake.lock index 2a1daa9..f4e0bdf 100644 --- a/home/ags/flake.lock +++ b/home/ags/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1738087375, - "narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=", + "lastModified": 1744557573, + "narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=", "owner": "aylur", "repo": "ags", - "rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4", + "rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6", "type": "github" }, "original": { @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1737670815, - "narHash": "sha256-ZCxxshGN7XooabArcoGkYSNx5yVunqjKJi2aTv6cznI=", + "lastModified": 1742571008, + "narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=", "owner": "aylur", "repo": "astal", - "rev": "127e9cdcbf173846a3c40ddc0abfbb038df48042", + "rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e", "type": "github" }, "original": { @@ -44,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1739736696, - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", + "lastModified": 1748693115, + "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", + "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc", "type": "github" }, "original": {