From: Phillip Berndt Date: Thu, 16 Dec 2021 08:52:19 +0000 (+0100) Subject: Merge --cycle option (needs work) X-Git-Tag: 1.12~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9a023ca0fa8fd7a12a99e8852a063266bf49f078;hp=c78ebce17d251e9a416f5ec9713d0aaa57b9b4a8;p=deb_pkgs%2Fautorandr.git Merge --cycle option (needs work) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a01ee28 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.*.swp diff --git a/README.md b/README.md index daa6b38..b4740af 100644 --- a/README.md +++ b/README.md @@ -147,9 +147,20 @@ names in your configuration directory to have autorandr use any of them as the default configuration without you having to change the system-wide configuration. -You can store default values for any option in an INI-file in -`~/.config/autorandr/settings.ini` in a section `config`. The most useful -candidate for doing that is `skip-options`, if you need it. +You can store default values for any option in an INI-file located at +`~/.config/autorandr/settings.ini`. In a `config` section, you may place any +default values in the form `option-name=option-argument`. + +A common and effective use of this is to specify default `skip-options`, for +instance skipping the `gamma` setting if using +[`redshift`](https://github.com/jonls/redshift) as a daemon. To implement +the equivalent of `--skip-options gamma`, your `settings.ini` file should look +like this: + +``` +[config] +skip-options=gamma +``` ## Advanced usage @@ -238,6 +249,9 @@ options nvidia_drm modeset=1 ## Changelog +**autorandr 1.12** +* *2021-12-16* Switch default interpreter to Python 3 + **autorandr 1.11** * *2020-05-23* Handle empty sys.executable * *2020-06-08* Fix Python 2 compatibility diff --git a/autorandr.1 b/autorandr.1 index d268822..9bc7a78 100644 --- a/autorandr.1 +++ b/autorandr.1 @@ -58,6 +58,17 @@ Force loading or reloading of a profile .TP .BR \-\-version Show version information and exit +.SH FILES +Configuration files are searched for in the \fIautorandr +\fRdirectory in the colon separated list of paths in \fI$XDG_CONFIG_DIRS +\fR- or in \fI/etc/xdg +\fRif that var is not set. They are then looked for in \fI~/.autorandr +\fRand if that doesn't exist, in \fI$XDG_CONFIG_HOME/autorandr +\fRor in \fI~/.config/autorandr\fR if that var is unset. + +In each of those directories it looks for directories with \fIconfig\fR and +\fIsetup\fR in them. It is best to manage these files with the +\fBautorandr\fR utility. .SH AUTHOR \fRPhillip Berndt .br diff --git a/autorandr.py b/autorandr.py index 0581f57..9f1f557 100755 --- a/autorandr.py +++ b/autorandr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # encoding: utf-8 # # autorandr.py @@ -39,10 +39,14 @@ import time import glob from collections import OrderedDict -from distutils.version import LooseVersion as Version from functools import reduce from itertools import chain +try: + from packaging.version import Version +except ModuleNotFoundError: + from distutils.version import LooseVersion as Version + if sys.version_info.major == 2: import ConfigParser as configparser else: @@ -82,6 +86,7 @@ Usage: autorandr [options] --dry-run don't change anything, only print the xrandr commands --fingerprint fingerprint your current hardware setup --force force (re)loading of a profile / overwrite exiting files +--list list configurations --skip-options