nix-git/modules/gnome-fractional-scaling.nix

33 lines
1.4 KiB
Nix
Raw Normal View History

2023-09-18 21:49:26 +02:00
{ config, pkgs, lib, ... }:
2023-09-06 19:29:51 +02:00
{
# https://wiki.archlinux.org/title/HiDPI#Wayland
# Results in blurry font in non-Wayland applications :/
2023-09-07 13:47:44 +02:00
# https://wiki.archlinux.org/title/HiDPI#Xorg
2024-02-12 17:19:44 +01:00
# https://devicetests.com/set-different-scaling-multi-monitors-gnome
# "scale-monitor-framebuffer": This allows GNOME to scale each monitors 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.
2024-12-05 13:19:07 +01:00
# TODO: Open issue. Fractional scaling can't be enabled with multiple monitors.
# TODO: X11 or Wayland or both?
2024-02-12 17:19:44 +01:00
# 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
2024-12-05 13:19:07 +01:00
assertions = [{
assertion = config.services.xserver.displayManager.gdm.wayland;
message = "Fractional scaling is only supported for Wayland. There is a patch for X11, but we no longer apply it in an overlay. See e.g. https://aur.archlinux.org/packages/mutter-x11-scaling";
}];
2023-09-18 21:49:26 +02:00
2024-12-05 13:19:07 +01:00
programs.dconf.enable = true;
2023-09-07 13:47:44 +02:00
2023-09-06 19:29:51 +02:00
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
dconf.settings = {
"org/gnome/mutter" = {
2024-12-05 13:19:07 +01:00
experimental-features = ["scale-monitor-framebuffer" "xwayland-native-scaling"];
2023-09-06 19:29:51 +02:00
};
};
};
}