Epakai [Fri, 9 Jun 2023 09:53:40 +0000 (04:53 -0500)]
Direct --match-edid renaming of output messages to stderr
This change helps scripts that consume autorandr output to only deal with profile names. My particular concern is with the output from 'autorandr --match-edid --detected'. With this change, only the detected profiles will go to another script. Command line users can still see the relevant messages if they have concerns about which port is in use.
With this commit autorandr will check if the current environment has the
`WAYLAND_DISPLAY` environment variable set. If yes, it will exit
(in interactive mode) or skip (in batch mode), to avoid issues between
xrandr usage and Wayland environments.
Patrick Deubel [Tue, 25 Apr 2023 15:31:21 +0000 (17:31 +0200)]
Replaced MAKECMDGOALS with DEFAULT_TARGETS to check for systemd
when installing udev rules
MAKECMDGOALS does not containg "systemd" although systemd is used
on the system. Thus, an incorrect udev rule is created. DEFAULT_TARGETS
however does contain "systemd", because of a check earlier in the
Makefile (lines 83-85).
Make commands independent of location on system
It helps running autorandr_nitrogen_wallpaper on systems without
/bin/bash, /usr/bin/unlink, /bin/cp and /bin/mv. E.g. NixOS, which
doesn't have /bin/bash.
Add reverse versions of horizontal/vertical virtual profiles
Add "vertical-reverse" and "horizontal-reverse" to virtual profiles dictionary and use reversed() iter of configuration dictionary if user selects these.
Florian Schmaus [Thu, 20 Oct 2022 08:48:54 +0000 (10:48 +0200)]
Makefile: fix install_udev target by s/TARGETS/MAKECMDGOALS/
A Gentoo user reported [1] that the 'install_udev' target would
install a systemd-flavored udev rules, despite the 'systemd' target
not being selected. Replacing 'TARGETS' with 'MAKECMDGOALS' in the
Makefile rule fixes this .
I am not sure where the TARGETS variable origniates from, but GNU make
uses MAKECMDGOALS (FreeBSD make uses .TARGETS, i.e., with a leading
dot). So if further portability between make variants is required,
then this needs to be adjusted.
1: https://bugs.gentoo.org/803545#c3 Fixes: ae1f18a06039 ("udev rule: Dynamically call either systemd or autorandr directly depending on whether systemd unit is available")
Extended --match-edid to respect a device's serial
Autorandr parses a device's EDID to extract its
serial number. If --match-edid is used and the serial
is available, a profile is first matched based
on the serial number. If not available,
the old EDID-based behavior is used.
This way a profile can be matched precisly, even if
the EDID data changes. This might be the case
if a monitor's connection is switched from HDMI to
VGA, for example.
Phillip Berndt [Thu, 16 Dec 2021 09:14:19 +0000 (10:14 +0100)]
Fix mtime updating for --cycle
mtime updating resulted in --cycle always switching between the two most
recently used profiles. Invert the sort order if --cycle is in use to
mitigate.
Johannes Lange [Mon, 11 Jan 2021 16:47:03 +0000 (17:47 +0100)]
--list option: list configuration
- lists (all) configurations
- can be used with --curent and --detected
- in contrast to no arguments at all, it does not print decorations like "(detected)", "(current)", ...
Kevin Lyda [Sun, 11 Jul 2021 13:48:05 +0000 (14:48 +0100)]
Explain where files are saved
For people who manage their home directories with things like vcsh or
other versioning system, it's good to know where configuration files
live. This CL adds a FILES section to the man page.
Simon Piriou [Mon, 17 May 2021 09:52:46 +0000 (11:52 +0200)]
Add an option to match profiles based on edid
In some cases the display names change so the profile matching fails.
This commit introduces the "--match-edid" option, that allows one to
specify that the profiles matching should be done based on display edid.
This is done by updating the profiles after loading, based on current
display name/edid mapping requested using xrandr.
noughtnaut [Mon, 30 Nov 2020 23:21:05 +0000 (00:21 +0100)]
Reword README regarding environment variables
This clarifies the usage somewhat, without needing changes to existing
functionality. I may look into reworking the variables, but until then
this will be an improvement. That is to say, this is meant to NOT
resolve issue #230.
- Add section heading for variables
- Move `predetect`/`sleep` example up above new section
- Add example usage of variable, and explain the oddity with 'current'
profile during preswitch.
Phillip Berndt [Sun, 15 Nov 2020 15:32:28 +0000 (16:32 +0100)]
Release 1.11
This updates the readme with changes since 1.10.1 and releases 1.11.
This version primarily brings small bugfixes, only change warranting
minor version bump is that batch mode now assigns user groups.