X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=fe1906d16e83b2fed2f71ddbee8592eee1ce6ff9;hb=ffd20489a2beacecf295f138dcfb9f6106d6a606;hp=d36b568485aca6e87a3b61e83ada3be63fe866b6;hpb=4dbe0d4ed2df628e946e81d7572f800896bc80c5;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index d36b568..fe1906d 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,35 @@ from __future__ import print_function import binascii import copy -import fnmatch import getopt import hashlib +import math 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.7" +__version__ = "1.12.1" try: input = raw_input @@ -64,6 +70,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 +96,15 @@ 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 +--ignore-lid treat outputs as connected even if their lids are closed +--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