X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=9f302440e89058edd89d63cd7bc56f2cdac0614d;hb=5a6ded231f585c484a4d696ac0e641b480c4b0f8;hp=f3612cb6cca730c1d490eea1cb0924b1b7ffb247;hpb=7086c637535d9053220f0764a7b8bb65d91fa279;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index f3612cb..9f30244 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.5" +__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