From 634962812a1d33b5e846da831314794760aa232e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 30 Nov 2025 20:44:07 -0500 Subject: add desc/position/size options for monitors --- home/desktops/hyprland/binds.nix | 9 --------- home/desktops/hyprland/settings.nix | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'home') 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; }) -- cgit v1.2.3-freya