diff options
Diffstat (limited to 'home')
| -rw-r--r-- | home/desktops/hyprland/binds.nix | 9 | ||||
| -rw-r--r-- | home/desktops/hyprland/settings.nix | 14 |
2 files changed, 12 insertions, 11 deletions
diff --git a/home/desktops/hyprland/binds.nix b/home/desktops/hyprland/binds.nix index edd7d44..df4ecc0 100644 --- a/home/desktops/hyprland/binds.nix +++ b/home/desktops/hyprland/binds.nix @@ -126,14 +126,5 @@ ", XF86MonBrightnessDown, exec, brightnessctl set 5%-" ", XF86MonBrightnessUp, exec, brightnessctl set 5%+" ]; - - bindl = let - monitor = builtins.elemAt config.monitors 0; - cfg = "highres, auto, ${toString monitor.scale}, bitdepth, ${toString monitor.bitdepth}"; - in [ - # Laptops when docked - ", switch:on:Lid, exec, hyprctl keyword monitor \"${monitor.name}, disable\"" - ", switch:off:Lid, exec, hyprctl keyword monitor \"${monitor.name}, ${cfg}\"" - ]; }; } diff --git a/home/desktops/hyprland/settings.nix b/home/desktops/hyprland/settings.nix index a82b6db..2f7d4fb 100644 --- a/home/desktops/hyprland/settings.nix +++ b/home/desktops/hyprland/settings.nix @@ -16,8 +16,18 @@ # Monitors monitorv2 = map (monitor: { - output = monitor.name; - mode = "highres"; + output = + if monitor.desc == "" + then monitor.port + else "desc:${monitor.desc}"; + mode = + if monitor.size.enabled + then "${toString monitor.size.x}x${toString monitor.size.y}" + else "preferred"; + position = + if monitor.position.enabled + then "${toString monitor.position.x}x${toString monitor.position.y}" + else "auto"; scale = toString monitor.scale; bitdepth = toString monitor.bitdepth; }) |