dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

1b76c9c

Match the screens by model, not port

By Gustaf Granström

The ROG came back on DP-3 after its cable was borrowed, so the DP-1 rules
missed it: 60 Hz, landscape, and no workspaces 3-5. Matching by description
keeps the setup whichever socket each cable is in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

No jobs

1 file changed +10 −4

@@ -52,16 +52,18 @@
5252 configType = "lua";
5353
5454 settings = {
55+ # Screens are matched by model rather than port, so they keep their
56+ # setup whichever socket the cable ends up in.
5557 monitor = [
5658 {
57- output = "HDMI-A-2";
59+ output = "desc:ASUSTek COMPUTER INC XG27AQWMG";
5860 mode = "2560x1440@280";
5961 position = "0x0";
6062 scale = 1;
6163 vrr = 0;
6264 }
6365 {
64- output = "DP-1";
66+ output = "desc:Ancor Communications Inc ROG PG278Q";
6567 mode = "2560x1440@144";
6668 position = "2560x-900";
6769 scale = 1;
@@ -70,10 +72,14 @@
7072 }
7173 ];
7274
73- # Workspaces 1-2 on HDMI-A-2, 3-5 on DP-1.
75+ # Workspaces 1-2 on the landscape ASUS, 3-5 on the portrait ROG.
7476 workspace_rule = map (workspace: {
7577 workspace = toString workspace;
76- monitor = if workspace <= 2 then "HDMI-A-2" else "DP-1";
78+ monitor =
79+ if workspace <= 2 then
80+ "desc:ASUSTek COMPUTER INC XG27AQWMG"
81+ else
82+ "desc:Ancor Communications Inc ROG PG278Q";
7783 persistent = true;
7884 }) (lib.range 1 5);
7985