X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=3e1788284add3e64078f70ce4289751e39a8d02b;hb=a50b16aa1ad5a6819e902cc0570bbf18421563fc;hp=f14f5ab536152f60109e47524d092f673e0ba753;hpb=6511bf29f9a8c3082d5bbdccaf5fa8ad3de0214d;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index f14f5ab..3e17882 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,29 +26,34 @@ 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 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.5" +__version__ = "1.11" try: input = raw_input @@ -64,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] @@ -76,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 ---force force (re)loading of a profile +--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