X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=autorandr.py;h=ccae9681cf243431102162c521d4e12b43f0b4f1;hb=bf3805c9195ebf50d21bc0d95b15a7ad968feb73;hp=13877a3bf60782d68e4c0c0aa61215ffe87e7cc3;hpb=9f4fc9fbe7dffb8d1acec893f77596a9989f93ad;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index 13877a3..ccae968 100755 --- a/autorandr.py +++ b/autorandr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # encoding: utf-8 # # autorandr.py @@ -26,13 +26,13 @@ from __future__ import print_function import binascii import copy -import fnmatch import getopt import hashlib import os import posix import pwd import re +import shlex import subprocess import sys import shutil @@ -40,16 +40,20 @@ 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: import configparser -__version__ = "1.9" +__version__ = "1.11" try: input = raw_input @@ -65,6 +69,20 @@ virtual_profiles = [ ("vertical", "Stack all connected outputs vertically at their largest resolution", None), ] +properties = [ + "Colorspace", + "max bpc", + "aspect ratio", + "Broadcast RGB", + "audio", + "non-desktop", + "TearFree", + "underscan vborder", + "underscan hborder", + "underscan", + "scaling mode", +] + help_text = """ Usage: autorandr [options] @@ -77,11 +95,14 @@ Usage: autorandr [options] --batch run autorandr for all users with active X11 sessions --current only list current (active) configuration(s) --config dump your current xrandr setup +--cycle automatically load the next detected profile --debug enable verbose output --detected only list detected (available) configuration(s) --dry-run don't change anything, only print the xrandr commands --fingerprint fingerprint your current hardware setup +--match-edid match diplays based on edid instead of name --force force (re)loading of a profile / overwrite exiting files +--list list configurations --skip-options