Commit Graph

196 Commits

Author SHA1 Message Date
Phillip Berndt
83a911dc2b Pass meta-information to block scripts
Currently, $AUTORANDR_CURRENT_PROFILES and $AUTORANDR_CURRENT_PROFILE
are supported, containing a colon-separated list (or the first,
respectively) of active profiles. If no profile was detected as
active/current, both variables will be empty.

This fixes #42
2016-01-03 12:31:11 +01:00
Phillip Berndt
53f7af43c6 pm-utils script: Check for xinit as a fallback 2015-12-07 09:51:35 +01:00
Phillip Berndt
61045d9eeb Remove autorandr_monitor, closes bug #41 2015-12-05 17:04:35 +01:00
Phillip Berndt
737ca561f4 pm-utils script: Potential fixes for bugs #30 and #39 2015-12-04 12:53:17 +01:00
Phillip Berndt
2b3ac61cda Merge pull request #40 from blueyed/executable-pm-script
The 40autorandr script needs to be executable for udev
2015-12-03 09:17:57 +01:00
Daniel Hahler
4597a78e6a The 40autorandr script needs to be executable for udev
Otherwise it will not be executed:
… systemd-udevd[32358]: failed to execute '/etc/pm/sleep.d/40autorandr' '/etc/pm/sleep.d/40autorandr thaw': Permission denied
… systemd-udevd[32355]: Process '/etc/pm/sleep.d/40autorandr thaw' failed with exit code 2.
2015-12-02 12:43:19 +01:00
Phillip Berndt
dcb1e65fd1 Only use name of executable in systemd detection (See #38) 2015-11-24 19:10:24 +01:00
Phillip Berndt
48713bbae2 Improved systemd detection (See bug #38, thanks to @blueyed) 2015-11-24 19:05:46 +01:00
Phillip Berndt
96231a60c0 Skip --transform unless necessary (See #37) 2015-11-17 10:27:43 +01:00
Phillip Berndt
b606952b22 Reorganized import statements 2015-11-11 15:24:54 +01:00
Phillip Berndt
0e7fb8b21d Moved contributed scripts/files to the contrib/ folder and updated the Makefile to autodetect the system
systemd service file contributed by github user @blueyed. see #29.
2015-11-11 11:22:24 +01:00
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