X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=a65322d90c4ea4168a4748ba47befb5423e1de85;hb=a997298c5da19ee9eb808bac9b6c494798f7f924;hp=d70e9f0f614553024f263856e4ea79e6d322ce8f;hpb=aeb5b97b28b9dd15ff8df037c2a92798d4372533;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index d70e9f0..a65322d 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. # @@ -21,33 +21,53 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# TODO Add virtual profiles common, horizontal, vertical -# This also requires to load all resolutions into the XrandrOutputs from __future__ import print_function -import getopt import binascii +import copy +import getopt import hashlib import os +import posix import re import subprocess import sys +import shutil +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), + ("horizontal", "Stack all connected outputs horizontally at their largest resolution", None), + ("vertical", "Stack all connected outputs vertically at their largest resolution", None), +] + help_text = """ Usage: autorandr [options] --h, --help get this small help --c, --change reload current setup --s, --save save your current setup to profile --l, --load load profile +-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 ---force force (re)loading of a profile ---fingerprint fingerprint your current hardware setup ---config dump your current xrandr setup +--skip-options