X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=blobdiff_plain;f=autorandr.py;h=1e980f6f7c0f7bc8f96999e36f5162a3971f5403;hp=713ff4b4f6bae8a10d62e12c614a469ede4332e3;hb=HEAD;hpb=5072674fcf90e20f8e381d86f33038fc8f2b288b diff --git a/autorandr.py b/autorandr.py index 713ff4b..93b4e79 100755 --- a/autorandr.py +++ b/autorandr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # encoding: utf-8 # # autorandr.py @@ -28,10 +28,12 @@ import binascii import copy import getopt import hashlib +import math import os import posix import pwd import re +import shlex import subprocess import sys import shutil @@ -42,17 +44,13 @@ from collections import OrderedDict from functools import reduce from itertools import chain -try: - from packaging.version import Version -except ModuleNotFound: - from distutils.version import LooseVersion as Version if sys.version_info.major == 2: import ConfigParser as configparser else: import configparser -__version__ = "1.11" +__version__ = "1.14" try: input = raw_input @@ -66,6 +64,22 @@ virtual_profiles = [ ("clone-largest", "Clone all connected outputs with the largest resolution (scaled down if necessary)", None), ("horizontal", "Stack all connected outputs horizontally at their largest resolution", None), ("vertical", "Stack all connected outputs vertically at their largest resolution", None), + ("horizontal-reverse", "Stack all connected outputs horizontally at their largest resolution in reverse order", None), + ("vertical-reverse", "Stack all connected outputs vertically at their largest resolution in reverse order", None), +] + +properties = [ + "Colorspace", + "max bpc", + "aspect ratio", + "Broadcast RGB", + "audio", + "non-desktop", + "TearFree", + "underscan vborder", + "underscan hborder", + "underscan", + "scaling mode", ] help_text = """ @@ -80,11 +94,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 +--ignore-lid treat outputs as connected even if their lids are closed +--match-edid match displays based on edid instead of name --force force (re)loading of a profile / overwrite exiting files +--list list configurations --skip-options