Xorg: Difference between revisions
Translate to ukrainian Tags: Reverted Visual edit |
Tag: Undo |
||
Line 1: | Line 1: | ||
== HiDPI == | == 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: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
# | # bigger tty fonts | ||
console.font = | console.font = | ||
"${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; | "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; | ||
services.xserver.dpi = 180; | services.xserver.dpi = 180; | ||
environment.variables = { | environment.variables = { | ||
## | ## Used by GTK 3 | ||
# `GDK_SCALE` | # `GDK_SCALE` is limited to integer values | ||
GDK_SCALE = "2"; | GDK_SCALE = "2"; | ||
# | # Inverse of GDK_SCALE | ||
GDK_DPI_SCALE = "0.5"; | GDK_DPI_SCALE = "0.5"; | ||
Line 22: | Line 22: | ||
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=2"; | _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2"; | ||
}; | }; | ||
# | # Expose variables to graphical systemd user services | ||
services.xserver.displayManager.importedVariables = [ | services.xserver.displayManager.importedVariables = [ | ||
"GDK_SCALE" | "GDK_SCALE" | ||
Line 30: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To enable HiDPI scaling for Qt 6 applications, add the following to <code>.Xresources</code>: | |||
<syntaxhighlight> | <syntaxhighlight> | ||
Line 36: | Line 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == Disabling touchpad and mouse accelerations == | ||
To disable touchpad and mouse accelerations just add the following lines to your <code>configuration.nix</code> | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 48: | Line 48: | ||
enable = true; | enable = true; | ||
# | # disabling mouse acceleration | ||
mouse = { | mouse = { | ||
accelProfile = "flat"; | accelProfile = "flat"; | ||
}; | }; | ||
# | # disabling touchpad acceleration | ||
touchpad = { | touchpad = { | ||
accelProfile = "flat"; | accelProfile = "flat"; | ||
Line 64: | Line 64: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To get more information see <code>man configuration.nix</code>. | |||
== | == Exclude packages == | ||
Some packages like xterm are included when enabling Xorg. To exclude packages, edit the <code>configuration.nix</code> as the example, but be sure to have another terminal enabled in your build before doing this. | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 75: | Line 75: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == See also == | ||
* [[Nvidia]] | * [[Nvidia]] |