X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=blobdiff_plain;f=autorandr.py;h=9524f4274d8275ca32bb9b53c8d55673cd1a5684;hp=481d810e561f1510ea0ee9c6275eb079491a9d98;hb=1a48d584fe533555581f3f98818cd0ad9bd92334;hpb=a50ac263773294c16836189f55663ed7c861d5c0 diff --git a/autorandr.py b/autorandr.py index 481d810..9524f42 100755 --- a/autorandr.py +++ b/autorandr.py @@ -23,24 +23,43 @@ # from __future__ import print_function -import copy -import getopt import binascii +import copy +import fnmatch +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 collections import OrderedDict +from distutils.version import LooseVersion as Version from functools import reduce from itertools import chain -from collections import OrderedDict + +if sys.version_info.major == 2: + import ConfigParser as configparser +else: + import configparser + +__version__ = "1.6" + +try: + input = raw_input +except NameError: + pass virtual_profiles = [ # (name, description, callback) + ("off", "Disable all outputs", None), ("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), ] @@ -49,32 +68,34 @@ 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 +-c, --change automatically load the first detected profile -d, --default make profile the default profile ---force force (re)loading of a profile ---fingerprint fingerprint your current hardware setup +-l, --load load profile +-s, --save save your current setup to profile +-r, --remove remove profile +--batch run autorandr for all users with active X11 sessions +--current only list current (active) configuration(s) --config dump your current xrandr setup +--debug enable verbose output +--detected only list detected (available) configuration(s) --dry-run don't change anything, only print the xrandr commands - - To prevent a profile from being loaded, place a script call "block" in its - directory. The script is evaluated before the screen setup is inspected, and - in case of it returning a value of 0 the profile is skipped. This can be used - to query the status of a docking station you are about to leave. +--fingerprint fingerprint your current hardware setup +--force force (re)loading of a profile +--skip-options