Skip to main content

Extend a HIDPI screen to a normal DPI external display

Project description

Extend a HIDPI screen to a normal DPI external display. This command line tool implements various solutions described in the HIDPI Arch Linux wiki page.

Installation

pip install -e git+https://github.com/ashwinvis/xrandr-extend.git#egg=xrandr_extend --user

or alternatively

git clone https://github.com/ashwinvis/xrandr-extend.git
cd xrandr-extend
pip install -e . --user

Configuration

python -m xrandr_extend.config

This creates a file ~/.config/xrandr-extend.cfg which looks like this:

[provider:modesetting]
primary = eDP-1
hdmi = HDMI-1
vga = DP-1

[provider:intel]
primary = eDP1
hdmi = HDMI1
vga = DP1

[resolutions]
primary = (3200, 1800)
hdmi = (1920, 1080)
vga = (1920, 1200)

The first few sections have the name in the format [provider:display_driver]. Run xrandr --listproviders to find what your system has. The values in this section should be given as alias = monitor_name, as in the output of xrandr --listmonitors command. You may even remove existing sections and add more sections for your display driver.

Each line in the [resolutions] section signifies a resolution profile in the format alias = [width_in_pixels, height_in_pixels]. The profile primary should contain the resolution of your built-in display. You may edit or remove the remaining values hdmi and vga.

Quick reference

usage: xrandr-extend [-h] [-p PRI_RES PRI_RES] [-e EXT_RES EXT_RES] [-m] [-n]
                     [-o] [-s] [-d]
                     profile

Extend a HIDPI screen to a normal DPI external display

positional arguments:
  profile               Use preset external resolution profiles (available:
                        ['hdmi', 'vga']).

optional arguments:
  -h, --help            show this help message and exit
  -p PRI_RES PRI_RES, --pri-res PRI_RES PRI_RES
                        Modify preset resolution of primary display (default
                        [3200, 1800])
  -e EXT_RES EXT_RES, --ext-res EXT_RES EXT_RES
                        Modify preset resolution of ext. display (default
                        based on profile)
  -m, --mirror          Mirror the ext. display
  -n, --pan             pan the position of ext. display
  -o, --only            extend and use only ext. display
  -s, --pos             set the position of ext. display explicitly
  -d, --dry-run         Preview command without executing it

Examples
--------
# Default option requires only the scaling factors and display name
$ xrandr-extend --dry-run vga
$ xrandr-extend vga
$ xrandr-extend hdmi

# Other options to extend the display
$ xrandr-extend --pan hdmi
$ xrandr-extend --only hdmi
$ xrandr-extend -e 1024 768 -n vga  # Pan with custom external resolution

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xrandr-extend-0.0.3.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file xrandr-extend-0.0.3.tar.gz.

File metadata

  • Download URL: xrandr-extend-0.0.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for xrandr-extend-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a1e9dfbb93dd936fbc68800fa186a8aa243f3e1485ea60d2367b0b780a0f2ad2
MD5 3caee7ba451c061122337a85759f5790
BLAKE2b-256 432cc887f4f3c4a627eeb585f97dc8b2d4bad25f7c84cfca6b74f7abb7d0f26a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page