Xorg: Difference between revisions

From NixOS Wiki
imported>Mic92
No edit summary
imported>Mic92
hidpi: add java
Line 13: Line 13:
     GDK_SCALE = "2";
     GDK_SCALE = "2";
     GDK_DPI_SCALE = "0.5";
     GDK_DPI_SCALE = "0.5";
    _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
   };
   };
</pre>
</pre>

Revision as of 11:10, 17 March 2020

HiDPI

HiDPI (High Dots Per Inch) displays, also known by Apple's "Retina Display" marketing name, are screens with a high resolution in a relatively small format. They are mostly found in high-end laptops and monitors.

Not all software behaves well in high-resolution mode yet. Here are listed most common tweaks which make work on a HiDPI screen more pleasant:

  # bigger tty fonts
  console.font =
    "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
  services.xserver.dpi = 180;
  environment.variables = {
    GDK_SCALE = "2";
    GDK_DPI_SCALE = "0.5";
    _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
  };

Disabling mouse acceleration

To disable mouse acceleration for a touchpad, it's as simple as

  services.xserver.libinput.enable = true;
  services.xserver.libinput.accelProfile = "flat";

But to disable it for a mouse, it's a bit more wordy -

  services.xserver.libinput.enable = true;
  services.xserver.config = ''
    Section "InputClass"
      Identifier "mouse accel"
      Driver "libinput"
      MatchIsPointer "on"
      Option "AccelProfile" "flat"
      Option "AccelSpeed" "0"
    EndSection
  '';