diff --git a/modules/gnome-fractional-scaling.nix b/modules/gnome-fractional-scaling.nix index 6d2e931..105fc4c 100644 --- a/modules/gnome-fractional-scaling.nix +++ b/modules/gnome-fractional-scaling.nix @@ -8,6 +8,15 @@ in # https://wiki.archlinux.org/title/HiDPI#Xorg + # https://devicetests.com/set-different-scaling-multi-monitors-gnome + # "scale-monitor-framebuffer": This allows GNOME to scale each monitor’s framebuffer independently, which is necessary for per-monitor scaling. + # "x11-randr-fractional-scaling": This allows fractional scaling, which gives you finer control over the scaling factor. + + # TODO open issue: Fractional scaling can't be enabled with multiple monitors. + # https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2076 + # https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2365 + # -> https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2008355 + programs.dconf.enable = true; # Overlays. @@ -60,15 +69,13 @@ in home-manager.users.yoda = { osConfig, config, pkgs, ... }: { dconf.settings = { "org/gnome/mutter" = { - experimental-features = [ - ( - if (osConfig.services.xserver.displayManager.gdm.wayland) - # Wayland fractional scaling - then "scale-monitor-framebuffer" - # X11 fractional scaling - else "x11-randr-fractional-scaling" - ) - ]; + experimental-features = ( + if (osConfig.services.xserver.displayManager.gdm.wayland) + # Wayland + then ["scale-monitor-framebuffer"] + # X11 + else ["scale-monitor-framebuffer" "x11-randr-fractional-scaling"] + ); }; }; };