Commit Graph

185 Commits

Author SHA1 Message Date
Phillip Berndt
af4a3f82fd Print configuration differences for failed actions if --debug is set 2015-11-11 11:22:24 +01:00
Phillip Berndt
36f5154eba Merge pull request #36 from kepi/feature-nitrogen
Contrib: script for changing wallpapers on change
2015-08-01 10:30:26 +02:00
Kepi
4983ad5e8c Contrib: script for changing wallpapers on change
Simple script which allows you to save nitrogen's wallpaper setup
for current profile and restore it when profile is loaded.

Useful in case you are moving between different monitor setups and
orientations.
2015-08-01 01:53:32 +02:00
Phillip Berndt
b760747ba3 Only use connected displays in virtual profiles 2015-05-30 19:16:21 +02:00
Phillip Berndt
0243a5bb29 Add --debug for verbose output
This currently prints differences between detected/to-be-loaded and
current configurations.

See bug #27
2015-05-20 10:03:37 +02:00
Phillip Berndt
a79eb293b7 Show (current) after the current profile in the default output 2015-05-19 13:37:33 +02:00
Phillip Berndt
98c93c20ff Added --skip-options to ignore certain xrandr options
See issue #26. This feature is required if tools like redshift interfere
with autorandr: Redshift e.g. continuously adjusts the --gamma values
such that autorandr never recognizes its configurations. This option
allows users to tell autorandr to ignore, and not fiddle with, --gamma.
2015-05-17 18:48:35 +02:00
Phillip Berndt
b87aaea80b Merge pull request #31 from blueyed/improve-usage-error
Improve usage information with GetoptError
2015-05-17 18:47:37 +02:00
Phillip Berndt
8b9eb294ed Merge pull request #32 from blueyed/py3
py3: import reduce from functools
2015-05-17 18:46:25 +02:00
Daniel Hahler
a50ac26377 py3: import reduce from functools
This works for Python 2, too (tested on 2.6 and 2.7).
2015-05-17 17:55:26 +02:00
Daniel Hahler
36b7e2ae7d Improve usage information with GetoptError
- print to stderr
 - do not display help automatically
2015-05-17 17:47:59 +02:00
Phillip Berndt
ca61a75c09 Fixed --gamma value handling 2015-05-17 17:44:52 +02:00
Phillip Berndt
209e3f04d6 Added @blueyed to the contributors list 2015-05-17 10:12:07 +02:00
Phillip Berndt
de8ef9f2de Reformated main exception handler (Breaks PEP 8; I'm not a fan of the 80 cols rule) 2015-05-17 10:09:41 +02:00
Daniel Hahler
6de7ca40da Improve main exception handling: display traceback, handle BdbQuit
It handles "empty" exceptions (e.g. from BdbQuit (via ipdb.set_trace))
better and just makes Python display any uncaught exceptions (with
traceback) by raising them.

This removes the additional newlines, too.
2015-05-17 01:49:51 +02:00
Phillip Berndt
ed599bc5aa Fixed exception handler 2015-04-14 09:23:00 +02:00
Phillip Berndt
ea7526a4d7 Mode names need not be of the form <width>x<height>, but can be arbitrary
In the hope for _some_ sanity, the code still asumes that there is no
whitespace in mode names. This fixes #25.
2015-04-14 09:15:39 +02:00
Phillip Berndt
93e5266b30 More useful error messages 2015-04-10 11:36:48 +02:00
Phillip Berndt
89bf1ac166 Fixed output parsing error messages 2015-04-08 10:14:55 +02:00
Phillip Berndt
68d0d423f7 Detect modes that have *current at the end of the mode line 2015-04-08 10:14:39 +02:00
Phillip Berndt
1a37be02ae Detect tracking/border information for --panning 2015-04-08 10:14:19 +02:00
Phillip Berndt
98cbc6fd17 Detect negative positions 2015-04-08 10:13:36 +02:00
Phillip Berndt
ef35d830fb Support for RandR 1.3 --panning 2015-04-06 17:51:09 +02:00
Phillip Berndt
c24425d941 A screen can be disabled yet primary 2015-04-06 01:26:32 +02:00
Phillip Berndt
2f2e85c1ed Temporarily undo transformations when applying configurations
Haswell chips have problems if this is not done, they report:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)
  Serial number of failed request:  41
  Current serial number in output stream:  43

This commit circumvents this problem.
2015-03-30 08:05:42 +02:00
Phillip Berndt
89cd69bec9 Screens can be connected but unused, but also disconnected and still in use
Detect that.
2015-03-27 17:33:08 +01:00
Phillip Berndt
da467b16c7 Updated README with missing contributors 2015-03-26 16:13:54 +01:00
Phillip Berndt
89175899b5 Use a dummy EDID if an EDID is unavailable for an output 2015-03-26 09:28:59 +01:00
Phillip Berndt
f387f3da3b Merge pull request #22 from victorhaggqvist/patch-1
Fix `block` script filename in Python version
2015-03-24 11:41:32 +01:00
Victor Häggqvist
71c6ab1e12 fix: make block script name correspond to docs 2015-03-23 22:01:59 +01:00
Phillip Berndt
642ff4e4a7 typo 2015-03-08 18:16:53 +01:00
Phillip Berndt
29cd564aeb Prevent, in apply_configuration, a xrandr call that disables all screens
See pull request #20
2015-03-08 18:14:06 +01:00
Phillip Berndt
0bb7e07999 Leave one monitor active when applying configurations
See https://github.com/phillipberndt/autorandr/pull/20
2015-03-07 18:45:41 +01:00
Phillip Berndt
dc8d21a3c9 Accept empty lines in setup files 2015-03-07 18:45:20 +01:00
Phillip Berndt
5cf0539596 Explain why we enable outputs in pairs of two
See issue #21
2015-03-06 09:45:55 +01:00
Phillip Berndt
e5ae9d8c97 Detect if xrandr fails completely
Xrandr 1.0.2 didn't output --verbose like output at all. This change
detects that and outputs an error, instead of producing an empty
configuration.
2015-02-23 11:20:43 +01:00
Phillip Berndt
232bd6ba9f Enforce stable output order
This is useful for automated testing
2015-02-23 11:20:26 +01:00
Phillip Berndt
14df4cb5f9 Remember the last choice for competing configurations (with equal setups)
fixes #16
2015-02-23 10:48:02 +01:00
Phillip Berndt
586dce7ec5 If disabling outputs failed, try to disable them together with the second xrandr call
My notbook complains when I remove it from its docking station that
RRSetScreenSize failed if I disable a screen. Issuing the whole xrandr
command in one single call works fine.

This is related to f4cce4dc39
2015-02-18 08:02:18 +01:00
Phillip Berndt
ad5ac61291 Fix "transform" parsing
See related commit 376005b
2015-02-17 11:07:24 +01:00
Phillip Berndt
376005b588 Fix parsing of EDID
See bug #19.
2015-02-17 10:51:45 +01:00
Phillip Berndt
527c3cdae7 Transformation matrices can contain negative indices 2015-02-11 10:54:16 +01:00
Phillip Berndt
d8eca80181 Follow XDG completely: Also load configurations from the system-wide directories
I doubt this will be used widely, but there clearly is a use-case for
multi-user or centrally administrated systems. Per-user profiles always
override system-wide profiles.
2015-02-09 08:24:25 +01:00
Phillip Berndt
ca1720207e Updated help texts with XDG directory 2015-02-09 08:24:10 +01:00
Phillip Berndt
7233198c5f Fixed bash-completion (Lacked an `else') 2015-02-09 08:15:13 +01:00
Benjamin Cremer
0c01c37e5d Use XDG Base Directory Specification for config files 2015-02-06 20:47:44 +01:00
Phillip Berndt
ccfb4f9baf Python 3 issue in XRANDR_DEFAULTS 2015-01-27 08:30:30 +01:00
Phillip Berndt
e0dfa631a2 Removed legacy autorandr (see the legacy branch) 2015-01-27 08:26:10 +01:00
Phillip Berndt
9fe52b370d Log to stderr (Required to allow users to redirect --dry-run output) 2015-01-26 07:48:06 +01:00
Phillip Berndt
198d8eb06e Run xrandr disabling connected, but inactive outputs before any other xrandr commands
Related to bug #13
2015-01-26 07:46:45 +01:00