Back

Xorg Config Linux

Here is a summary of the Xorg configuration.

Xorg Keyboard

Keyboard config, see more details here: Keyboard configuration

In the file:/etc/X11/xorg.conf.d/00-keyboard.conf I have added the following code:


                Section "InputClass"
                        Identifier "system-keyboard"
                        MatchIsKeyboard "on"
                        Option "XkbLayout" "us, br"
                        Option "XkbModel" "pc105"
                    Option "XkbOptions" "ctrl:nocaps"
                    Option "XkbOptions" "compose:menu"
                    Option "AutoRepeat" "200 30"
                EndSection
                

I have also added the following lines to my .profile


                setxkbmap -option ctrl:nocaps 
                setxkbmap -option compose:menu
                xset r rate 200 30
                

I have also added the code xset r rate 250 30 to my .Xclients file.

Xorg Touchpad

Now I want to consider natural scrolling. In the file file /etc/X11/xorg.conf.d/10-touchpad.conf I add the code:


                Section "InputClass"
                        Identifier "system-touchpad"
                        Driver "libinput"
                        Option "NaturalScrolling" "true"
                EndSection
                

See more: Libinput

Displays

The fonts for my i3 config are ridiculously small, I and need to change the DPI. Here I follow Section 5.3 of Display Size and DPI.

Setting the DPI manually had no effect, see section 5.3.1, but then I read the section 5.3.1.2 ando noticed that there is a caveat. This is exactly what is happening to my monitor. In summary, I need to change the GTK config.

In conclusion, in my Xresources, located at /etc/X11/Xresources, I added


                xft.dpi: 144
                

By the way, the value 144 has an explanation. In the Xorg page cited above there is the quote:

Note: While you can set any dpi you like and applications using Qt and GTK will scale accordingly, it is recommended to set it to 96, 120 (25% higher), 144 (50% higher), 168 (75% higher), 192 (100% higher) etc., to reduce scaling artifacts to GUIs that use bitmaps. Reducing it below 96 dpi may not reduce the size of the GUIs graphical elements, as typically the lowest dpi the icons are made for is 96.