lol

Merge pull request #25892 from abbradar/xresources

Streamline DPI settings

authored by

John Ericson and committed by
GitHub
3efbe386 7738af36

+20 -19
+10
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
··· 781 781 </listitem> 782 782 <listitem> 783 783 <para> 784 + The fontconfig service’s dpi option has been removed. 785 + Fontconfig should use Xft settings by default so there’s no 786 + need to override one value in multiple places. The user can 787 + set DPI via ~/.Xresources properly, or at the system level per 788 + monitor, or as a last resort at the system level with 789 + <literal>services.xserver.dpi</literal>. 790 + </para> 791 + </listitem> 792 + <listitem> 793 + <para> 784 794 The <literal>yambar</literal> package has been split into 785 795 <literal>yambar</literal> and 786 796 <literal>yambar-wayland</literal>, corresponding to the xorg
+4
nixos/doc/manual/release-notes/rl-2111.section.md
··· 223 223 224 224 - The `openrazer` and `openrazer-daemon` packages as well as the `hardware.openrazer` module now require users to be members of the `openrazer` group instead of `plugdev`. With this change, users no longer need be granted the entire set of `plugdev` group permissions, which can include permissions other than those required by `openrazer`. This is desirable from a security point of view. The setting [`harware.openrazer.users`](options.html#opt-services.hardware.openrazer.users) can be used to add users to the `openrazer` group. 225 225 226 + - The fontconfig service's dpi option has been removed. 227 + Fontconfig should use Xft settings by default so there's no need to override one value in multiple places. 228 + The user can set DPI via ~/.Xresources properly, or at the system level per monitor, or as a last resort at the system level with `services.xserver.dpi`. 229 + 226 230 - The `yambar` package has been split into `yambar` and `yambar-wayland`, corresponding to the xorg and wayland backend respectively. Please switch to `yambar-wayland` if you are on wayland. 227 231 228 232 - The `services.minio` module gained an additional option `consoleAddress`, that
+1 -17
nixos/modules/config/fonts/fontconfig.nix
··· 78 78 </edit> 79 79 </match> 80 80 81 - ${optionalString (cfg.dpi != 0) '' 82 - <match target="pattern"> 83 - <edit name="dpi" mode="assign"> 84 - <double>${toString cfg.dpi}</double> 85 - </edit> 86 - </match> 87 - ''} 88 - 89 81 </fontconfig> 90 82 ''; 91 83 ··· 237 229 (mkRemovedOptionModule [ "fonts" "fontconfig" "hinting" "style" ] "") 238 230 (mkRemovedOptionModule [ "fonts" "fontconfig" "forceAutohint" ] "") 239 231 (mkRemovedOptionModule [ "fonts" "fontconfig" "renderMonoTTFAsBitmap" ] "") 232 + (mkRemovedOptionModule [ "fonts" "fontconfig" "dpi" ] "Use display server-specific options") 240 233 ] ++ lib.forEach [ "enable" "substitutions" "preset" ] 241 234 (opt: lib.mkRemovedOptionModule [ "fonts" "fontconfig" "ultimate" "${opt}" ] '' 242 235 The fonts.fontconfig.ultimate module and configuration is obsolete. ··· 279 272 Enable font antialiasing. At high resolution (> 200 DPI), 280 273 antialiasing has no visible effect; users of such displays may want 281 274 to disable this option. 282 - ''; 283 - }; 284 - 285 - dpi = mkOption { 286 - type = types.int; 287 - default = 0; 288 - description = '' 289 - Force DPI setting. Setting to <literal>0</literal> disables DPI 290 - forcing; the DPI detected for the display will be used. 291 275 ''; 292 276 }; 293 277
-1
nixos/modules/services/x11/display-managers/default.nix
··· 18 18 19 19 fontconfig = config.fonts.fontconfig; 20 20 xresourcesXft = pkgs.writeText "Xresources-Xft" '' 21 - ${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''} 22 21 Xft.antialias: ${if fontconfig.antialias then "1" else "0"} 23 22 Xft.rgba: ${fontconfig.subpixel.rgba} 24 23 Xft.lcdfilter: lcd${fontconfig.subpixel.lcdfilter}
+5 -1
nixos/modules/services/x11/xserver.nix
··· 297 297 dpi = mkOption { 298 298 type = types.nullOr types.int; 299 299 default = null; 300 - description = "DPI resolution to use for X server."; 300 + description = '' 301 + Force global DPI resolution to use for X server. It's recommended to 302 + use this only when DPI is detected incorrectly; also consider using 303 + <literal>Monitor</literal> section in configuration file instead. 304 + ''; 301 305 }; 302 306 303 307 updateDbusEnvironment = mkOption {