sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (2008B)


      1 xrandrfontsize
      2 ==============
      3 
      4 Description
      5 -----------
      6 Solves the frustrating necessity of adjusting the font size when constantly
      7 moving terminal window between monitors (i.e. by tiling WM).
      8 
      9 Primary usecases:
     10 
     11 * monitors have very different DPI (e.g. HiDPI laptop + FullHD monitor);
     12 * one monitor is near you (laptop) and another is far (UHD TV on the wall);
     13 * one monitor is for coding (large font) and another for logs (small font);
     14 * single ultrawide monitor is split into two (for main working area to be always in the center -- instead of bottom left corner).
     15 
     16 Example for monitor splitting (first associated area is treated as primary):
     17 ```bash
     18 xrandr --listmonitors | grep -wo "HDMI-0~[0-9]" | sed 's/^/--delmonitor /' | xargs -r xrandr
     19 xrandr --setmonitor HDMI-0~1 2845/648x1600/366+995+0 HDMI-0 --setmonitor HDMI-0~2 995/226x1600/366+0+0 none
     20 ```
     21 
     22 Configure
     23 ---------
     24 
     25 Associative map value meaning:
     26 
     27 * `commented-out` : fixed relative points size (monitor dpi)
     28 * `=0` : use fixed absolute pixel size (default screen dpi)
     29 * `>0` : use auto absolute pixel size (monitor dpi)
     30 * `<0` : use auto relative points size (monitor dpi)
     31 
     32 ```c
     33 MonitorConfig monitors_config[] = {
     34 	// {"eDP-1", ...},   // commented-out, uses default font size as usual
     35 	{"DP-1", 0},         // auto-scales font size based on global Xorg DPI
     36 	{"HDMI-0~1", -20},   // applies relative font size (e.g. "monospace-20")
     37 	{"HDMI-0~2", -14},   // uses smaller font for ultrawide side-screen
     38 	{"HDMI-1", 18},      // fixed font size for TV (i.e. "monospace:pixelsize=18")
     39 };
     40 ```
     41 
     42 NOTE: font size is assigned separately per each output name, because there is
     43 not much sense to scale font size strictly and **solely** by DPI.
     44 And you may need *intentionally* different font sizes (like usecases above).
     45 
     46 Download
     47 --------
     48 * [xrandrfontsize-0.8.4-20211224-2f6e597.diff](xrandrfontsize-0.8.4-20211224-2f6e597.diff)
     49 
     50 INFO: it clearly applies over at least 15 other patches.
     51 
     52 Authors
     53 -------
     54 * Dmytro Kolomoiets - <amerlyq+code@gmail.com>