Phillip Berndt [Wed, 23 Nov 2016 20:25:09 +0000 (21:25 +0100)]
batch mode: Skip all uid < 1000 programs instead of only uid = 0
This fixes bug #63, but might have unexpected side effects. From a
comment in the commit:
> The following line assumes that user accounts start at 1000 and that
> no one works using the root or another system account. This is rather
> restrictive, but de facto default. Alternatives would be to use the
> UID_MIN from /etc/login.defs or FIRST_UID from /etc/adduser.conf; but
> effectively, both values aren't binding in any way. If this breaks
> your use case, please file a bug on Github.
Phillip Berndt [Mon, 3 Oct 2016 16:33:30 +0000 (18:33 +0200)]
Support symlinking profiles
As announced in the readme. This allows to create a symlink
ln -s horizontal default
in the autorandr configuration directory to allow to use the horizontal
configuration per default without having to change the udev/systemd/etc.
configuration files, which by default pass `--default default`.
This largely ignores all Debian packaging standards, and simply creates
a Debian package which contains the files that would be installed if the
user typed `sudo make install' on his (Debian) system.
Austin Glaser [Tue, 30 Aug 2016 04:48:32 +0000 (22:48 -0600)]
Allow 40autorandr to handle any order fields from loginctl
This could be done a great deal more cleanly using bash regex matching;
however, as is stated elsewhere, the script will not always be executed
with bash.
There may be some merit to causing the script to always be executed with
bash (`#! /bin/bash` or even `#! /usr/bin/env bash`), but I'll admit I
don't know how widely installed bash is. I've certainly never found a
modern Linux install without bash, but my experience isn't the widest.
Phillip Berndt [Thu, 7 Jan 2016 14:16:27 +0000 (15:16 +0100)]
Adhere XDG basedir spec regarding order
It says that for duplicate information (i.e., equal file names), only
the one that comes first ought to be used. So we have to make sure to
load profiles in the correct order -- the ones that have the highest
priority last, because we just dict.update them all together. And in
script execution, we have to keep a list of file names already used in
scripts that have already been executed.
Phillip Berndt [Sun, 3 Jan 2016 11:27:59 +0000 (12:27 +0100)]
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.
Daniel Hahler [Wed, 2 Dec 2015 11:43:19 +0000 (12:43 +0100)]
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.
Phillip Berndt [Sun, 17 May 2015 09:27:36 +0000 (11:27 +0200)]
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.
Daniel Hahler [Sat, 16 May 2015 23:43:19 +0000 (01:43 +0200)]
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.
Phillip Berndt [Mon, 30 Mar 2015 06:05:42 +0000 (08:05 +0200)]
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
Phillip Berndt [Wed, 18 Feb 2015 07:02:18 +0000 (08:02 +0100)]
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.