Simple script running nvidia-settings (with anti-tearing) based on your configured layout
Project description
nvx
Simple script running nvidia-settings (with anti-tearing) based on your configured layout
Configuration
The configuration is stored in the file ~/.config/nvx/nvx.conf
.
It is a simple INI file, which contains the following sections:
- Layout: defines the layout matrix using the screen indices and can have multiple rows.
- Screens: must be called Screen_<screen index> and defines the screen properties.
Example
# $HOME/.config/nvx/nvx.conf
[Layout]
Row_1 = 0 4 0
Row_2 = 1 2 3
[Screen_0]
ScreenID = DUMMY-0
ScreenName = Dummy 0
ScreenResolution = 2560x1440
ScreenRefreshRate = 0
[Screen_1]
ScreenID = DP-4
ScreenName = Left Screen
ScreenResolution = 2560x1440
ScreenRefreshRate = 144
[Screen_2]
ScreenID = DP-0
ScreenName = Center Screen
ScreenResolution = 2560x1440
ScreenRefreshRate = 144
[Screen_3]
ScreenID = DP-2
ScreenName = Right Screen
ScreenResolution = 2560x1440
ScreenRefreshRate = 144
[Screen_4]
ScreenID = DP-3
ScreenName = Top Screen
ScreenResolution = 2560x1440
ScreenRefreshRate = 144
Notes:
- A dummy screen maybe used for offsetting the screens, you must call is DUMMY-<index>
Installation
Using pip
pip3 install nvx
Running
:warning: Running
nvx
for the first time without prior configuration will write the default config. Make sure to properly edit the generated configuration before running nvx again (you can use the output fromxrandr
to figure out the screen properties). Improperly configured screens could result in a black screen when running the script.
$ nvx --help
usage: main.py [-h] [-w WRAP] [layout ...]
Configure nvidia-settings for multiple screens
positional arguments:
layout Screen layout, e.g. 1 2 3, defaults to config file
options:
-h, --help show this help message and exit
-w WRAP, --wrap WRAP Number of screens per row, e.g. 2 with 4 screens will result in 2x2 layout, infinite if not set
$ nvx # runs using the default configuration
$ nvx 1 2 3 # overrides the layout to [1][2][3] with corresponding screens ids from the configuration
$ nvx 1 2 3 4 --wrap 2 # makes a 2x2 layout: [1][2]
# [3][4]
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
Built Distribution
File details
Details for the file nvx-0.2.0.tar.gz
.
File metadata
- Download URL: nvx-0.2.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be2c6cf96d6dc6189fda122952b179f69fce83c42f3bf98226457eb475ffb27 |
|
MD5 | 593291d2d3008a8da56f81fa1800f0ee |
|
BLAKE2b-256 | 045b966dffd4ec8febd3b56559298bd8b3a7ffe95b1d6e1425c6331424c6c99e |
File details
Details for the file nvx-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: nvx-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9389ae246d7cc519ec47c9880821299f1d11089c852eb0faa30db72a6be33c3 |
|
MD5 | 2c718e7a881f2671a1cfd75ec84820de |
|
BLAKE2b-256 | 913f9018a2b789ca4005402f645995028b43798764b444330de36ee885826f34 |