From 2cf0562cb66e33f9a2040bdd02a075d7e06f0e01 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 7 Jun 2025 14:31:44 +0800 Subject: [PATCH] fix(xwayland-satellite): fractional scaling --- config/hosts/imxyy-nix/home.nix | 9 +++++++++ modules/desktop/wm/niri/config.nix | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/config/hosts/imxyy-nix/home.nix b/config/hosts/imxyy-nix/home.nix index d495a29..d726fe7 100644 --- a/config/hosts/imxyy-nix/home.nix +++ b/config/hosts/imxyy-nix/home.nix @@ -83,6 +83,15 @@ "sleep 3; echo 'Xft.dpi: 120' | ${lib.getExe pkgs.xorg.xrdb} -merge" ]; } + { + command = [ + "sh" + "-c" + "sleep 3; ${lib.getExe pkgs.xsettingsd} -c ${pkgs.writeText "xsettingsd.conf" '' + Xft/DPI 122880 + ''}" + ]; + } ]; }; }; diff --git a/modules/desktop/wm/niri/config.nix b/modules/desktop/wm/niri/config.nix index 37c78cd..c7d0737 100644 --- a/modules/desktop/wm/niri/config.nix +++ b/modules/desktop/wm/niri/config.nix @@ -5,6 +5,20 @@ ... }: { + my.home.systemd.user.services.xwayland-satellite = { + Unit = { + Description = "xwayland-satellite"; + After = [ "niri.service" ]; + }; + Service = { + ExecStart = "${lib.getExe pkgs.xwayland-satellite-unstable}"; + Restart = "on-failure"; + }; + Install.WantedBy = [ + "niri.service" + ]; + }; + my.home.programs.niri.settings = { input = { focus-follows-mouse = { @@ -85,7 +99,6 @@ }; spawn-at-startup = map (c: { command = c; }) [ - [ "${lib.getExe pkgs.xwayland-satellite-unstable}" ] [ "${lib.getExe' pkgs.swaynotificationcenter "swaync"}" ] [ "${lib.getExe pkgs.swaybg}"