fractional scaling in X11/Wayland

This commit is contained in:
Daniel Langbein 2023-09-18 21:49:26 +02:00
parent a0bf823599
commit a812363039
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
# https://wiki.archlinux.org/title/HiDPI#Wayland # https://wiki.archlinux.org/title/HiDPI#Wayland
@ -11,7 +11,9 @@
# Overlays. # Overlays.
# https://nixos.wiki/wiki/Overlays#In_NixOS # https://nixos.wiki/wiki/Overlays#In_NixOS
# https://discourse.nixos.org/t/use-specific-pkg-version-in-overlay/32741/3 # https://discourse.nixos.org/t/use-specific-pkg-version-in-overlay/32741/3
nixpkgs.overlays = [
# If on X11, then use patched version of mutter.
nixpkgs.overlays = lib.mkIf (! config.services.xserver.displayManager.gdm.wayland) [
( (
# Patched version of mutter 44.2. # Patched version of mutter 44.2.
# Outdated example: https://nixos.wiki/wiki/Overlays#Overriding_a_package_inside_a_scope # Outdated example: https://nixos.wiki/wiki/Overlays#Overriding_a_package_inside_a_scope
@ -55,10 +57,13 @@
dconf.settings = { dconf.settings = {
"org/gnome/mutter" = { "org/gnome/mutter" = {
experimental-features = [ experimental-features = [
# Wayland fractional scaling (
"scale-monitor-framebuffer" if (osConfig.services.xserver.displayManager.gdm.wayland)
# X11 fractional scaling # Wayland fractional scaling
"x11-randr-fractional-scaling" then "scale-monitor-framebuffer"
# X11 fractional scaling
else "x11-randr-fractional-scaling"
)
]; ];
}; };
}; };