Xorg: Difference between revisions

Translate to ukrainian
Tags: Reverted Visual edit
Malix (talk | contribs)
m See also: feat: reference link to wayland
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://en.wikipedia.org/wiki/X.Org_Server Xorg] is the implementation of the [https://en.wikipedia.org/wiki/X_Window_System X Window System]. It acts as the bridge between your system's hardware and the graphical user environment enabling a variety of [[:Category:Desktop environment|desktop environments]] and [[:Category:Window managers|window managers]].
= Enabling =
On NixOS, users can enable and configure Xorg through the {{nixos:option|services.xserver}} module in their system configuration.
See {{NixOS Manual|name=NixOS Manual: Chapter - X Window Syestem|anchor=#sec-x11}} for information on using X11 with NixOS.
= Tips and tricks =
== HiDPI ==
== HiDPI ==


'''Дисплеї HiDPI (High Dots Per Inch)''', також відомі під маркетинговою назвою Apple "Retina Display", є екранами з високою роздільною здатністю в порівняно невеликому форматі. Вони переважно зустрічаються у високоякісних ноутбуках та моніторах.
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.


Не все програмне забезпечення ще працює добре у режимі високої роздільної здатності. Нижче наведено найпоширеніші налаштування, які роблять роботу на екрані HiDPI приємнішою:
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">
   # більші шрифти для tty
   # 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 = {
     ## Використовується GTK 3
     ## Used by GTK 3
     # `GDK_SCALE` обмежений цілочисельними значеннями
     # `GDK_SCALE` is limited to integer values
     GDK_SCALE = "2";
     GDK_SCALE = "2";
     # Зворотне GDK_SCALE
     # Inverse of GDK_SCALE
     GDK_DPI_SCALE = "0.5";
     GDK_DPI_SCALE = "0.5";


Line 22: Line 32:
     _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
     _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
   };
   };
   # Виставляти змінні для графічних системних служб користувача systemd
   # Expose variables to graphical systemd user services
   services.xserver.displayManager.importedVariables = [
   services.xserver.displayManager.importedVariables = [
     "GDK_SCALE"
     "GDK_SCALE"
Line 30: Line 40:
</syntaxhighlight>
</syntaxhighlight>


Щоб увімкнути масштабування HiDPI для застосунків Qt 6, додайте до <code>.Xresources</code>:
To enable HiDPI scaling for Qt 6 applications, add the following to <code>.Xresources</code>:


<syntaxhighlight>
<syntaxhighlight>
Line 36: Line 46:
</syntaxhighlight>
</syntaxhighlight>


== Вимкнення прискорення тачпада та миші ==
== Disabling touchpad and mouse accelerations ==
Щоб вимкнути прискорення тачпада та миші, просто додайте наступні рядки до своєї <code>configuration.nix</code>
 
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 59:
       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 75:
</syntaxhighlight>
</syntaxhighlight>


Щоб отримати більше інформації, дивіться <code>man configuration.nix</code>.
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.
Деякі пакети, такі як xterm, включені при увімкненні Xorg. Щоб виключити пакети, редагуйте configuration.nix як у прикладі, але переконайтеся, що у вас є інший термінал увімкнений у вашому складанні перед тим, як це зробити.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 75: Line 87:
</syntaxhighlight>
</syntaxhighlight>


== Дивіться також ==
= See also =


* [[Wayland]]
* [[Nvidia]]
* [[Nvidia]]
* [[AMD GPU]]
* [[AMD GPU]]
* [[Intel Graphics]]
* [[Intel Graphics]]
* [[:Category:Desktop environment]]
* [[:Category:Window managers]]


[[Category:Video]]
[[Category:Video]]