X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=e5ab42fdd0308695e720b6ada0415ccdd8751c0e;hb=b0257a2703e12139c14f524f502c1f27c99ae527;hp=18381df0fff950a2713030c4afe99bf3354c07ba;hpb=8e23d69d74eb0d60a7763901ceddbfa7851b861d;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index 18381df..e5ab42f 100755 --- a/autorandr.py +++ b/autorandr.py @@ -4,7 +4,7 @@ # autorandr.py # Copyright (c) 2015, Phillip Berndt # -# Experimental autorandr rewrite in Python +# Autorandr rewrite in Python # # This script aims to be fully compatible with the original autorandr. # @@ -23,23 +23,34 @@ # from __future__ import print_function -import copy -import getopt import binascii +import copy +import getopt import hashlib import os +import posix +import pwd import re import subprocess import sys -from distutils.version import LooseVersion as Version +import shutil +import time -from itertools import chain from collections import OrderedDict +from distutils.version import LooseVersion as Version +from functools import reduce +from itertools import chain + +try: + input = raw_input +except NameError: + pass virtual_profiles = [ # (name, description, callback) ("common", "Clone all connected outputs at the largest common resolution", None), + ("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), ] @@ -50,14 +61,19 @@ Usage: autorandr [options] -h, --help get this small help -c, --change reload current setup -s, --save save your current setup to profile +-r, --remove remove profile -l, --load load profile -d, --default make profile the default profile +--skip-options