Commit Graph

262 Commits

Author SHA1 Message Date
Phillip Berndt
899f6f652f Note that StartLimitInterval was renamed in systemd-230
Fixes #69.
2017-04-16 13:56:55 +02:00
Phillip Berndt
855c18b7f2 Fix changelog order 2017-01-22 12:57:49 +01:00
Phillip Berndt
a02f2f6968 Fix #66: Encode int to str in environ 2017-01-21 11:55:24 +01:00
Phillip Berndt
20fe858e08 Call autorandr via systemd from udev, remove pmutils script on systemd systems
This merges pull request #62.
2017-01-20 21:41:06 +01:00
Phillip Berndt
28dc3cdea6 Do not automatically reload/update daemons from Makefile
Instead, write an info message to the console. See #60. This affects
udev and systemd.
2017-01-20 15:14:15 +01:00
Phillip Berndt
8352997dcf Process --help first, before executing predetect hook 2017-01-20 15:14:15 +01:00
Phillip Berndt
c583fb4389 Set AUTORANDR_BATCH_PID environment variable in batch invocations 2017-01-20 15:14:15 +01:00
Phillip Berndt
455809c32d systemd unit: Rate limit execution
This prevents the udev rule to run autorandr once per monitor added or
removed, instead of once per change -- this is relevant, e.g., if a
notebook is (dis-)connected to/from a docking station.
2017-01-20 15:14:15 +01:00
Phillip Berndt
ae1f18a060 udev rule: Dynamically call either systemd or autorandr directly depending on whether systemd unit is available 2017-01-20 15:14:15 +01:00
Phillip Berndt
94ae61de9d Update scripts' PREFIX in Makefile's install targets 2017-01-20 15:14:15 +01:00
Phillip Berndt
2184cf58ac Prefer systemd sleep.target over pmutils 2017-01-20 15:14:15 +01:00
Phillip Berndt
3e9037c726 Invoke the systemd unit from udev, don't install pmutils if systemd is in use
See bug #61 and pr #60.
2017-01-20 15:14:15 +01:00
Phillip Berndt
f171c8a5ad Add script hook predetect, executed before invoking xrandr to detect the current config
See bug #61
2017-01-20 15:14:15 +01:00
Phillip Berndt
a56981281c Accept comments in config/setup files
Comments are lines starting with "#" - in the hope that no screen name
or xrandr option will ever start with a hash sign. Fixes #50.
2017-01-18 14:03:43 +01:00
Phillip Berndt
ff75a031ef Improve the error message if running a userscript fails (see issue #65) 2016-12-18 10:54:52 +01:00
Phillip Berndt
646cc03f67 Fix --dry-run output 2016-12-14 13:01:04 +01:00
Phillip Berndt
1aab2d350b Improve error messages: Include file name if the error didn't occur in autorandr.py 2016-12-14 12:55:08 +01:00
Phillip Berndt
f9b52400bd Tag the current code as v1.0 -- see github issue #54 2016-12-07 11:08:50 +01:00
Phillip Berndt
9b1ef49dd5 Merge pull request #64 from dschep/master
Add setup.py to allow installation via pip.
2016-11-30 22:18:44 +01:00
Phillip Berndt
95fcdad8c1 Reworded the pip instructions 2016-11-30 22:17:28 +01:00
Daniel Schep
47b2764a9f pip installable! 2016-11-30 08:04:13 -05:00
Phillip Berndt
1f06c91fa1 Wrap ifmain code in a function 2016-11-30 12:48:33 +01:00
Phillip Berndt
53d29f9927 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.
2016-11-23 21:25:09 +01:00
Phillip Berndt
986e5cfaf6 Merge pull request #59 from RasmusWL/udev-fix-install-path
Makefile: fix install path for udev rules
2016-11-06 18:18:23 +01:00
Rasmus Wriedt Larsen
33df4b3935 Makefile: fix install path for udev rules
`pkg-config --variable=udevdir udev` returns the root folder for udev.
2016-11-06 00:41:05 +01:00
Daniel Hahler
729e8caf52 Makefile: use pkg-config
This avoids patching the Makefile in Arch's autorandr-git package [1]
and should help with packaging this in general.

1: https://aur.archlinux.org/packages/autorandr-git/
2016-10-14 16:46:07 +02:00
Phillip Berndt
5bf6790cdd Merge pull request #57 from languitar/languitar-help-grammar
Fix grammar in online help
2016-10-05 20:57:26 +02:00
Johannes Wienke
82d57b23c4 Fix grammar in online help
Fix a minor grammar error in the online help
2016-10-05 17:40:04 +02:00
Phillip Berndt
dcd4b26548 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`.
2016-10-03 18:33:35 +02:00
Phillip Berndt
a223d6b44e Readme improvements 2016-10-03 18:21:19 +02:00
Phillip Berndt
b4db7ce465 Merge pull request #56 from nazar-pc/patch-1
Add extended notes about installation/removal and applying configuration on login
2016-10-03 18:04:24 +02:00
Phillip Berndt
8ba69c653c Fix some typos in the readme 2016-10-03 18:03:55 +02:00
Nazar Mokrynskyi
81008be9f9 Add extended notes about installation/removal and applying configuration on login 2016-10-03 05:51:44 +03:00
Phillip Berndt
88a6d671f1 Added @nazar-pc to contributor list 2016-10-02 21:19:18 +02:00
Phillip Berndt
76845107dd Install autostart desktop file by default 2016-10-02 21:14:47 +02:00
Phillip Berndt
e0e524747a Merge pull request #55 from nazar-pc/autostart_config
Autostart config added
2016-10-02 21:10:19 +02:00
Nazar Mokrynskyi
64a12d5fd8 Add xdg autostart config so that configuration will be applied on login.
Small fix for files searching.
2016-10-01 05:55:37 +03:00
Phillip Berndt
b70b81650a Added Makefile target to create a deb archive
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.
2016-09-19 14:32:28 +02:00
Phillip Berndt
bae286948a Introduce --batch option to autorandr: Run autorandr for each user with an X11 session
This is an attempt to resolve #45 and it might also be a better
alternative to #52, #44 and #39.
2016-09-16 16:19:24 +02:00
Phillip Berndt
3c12874f14 Merge branch 'austinglaser-pm-util-loginctl-order' 2016-08-30 11:40:31 +02:00
Austin Glaser
8467e92bd5 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.
2016-08-29 22:48:32 -06:00
Phillip Berndt
756bf74c13 Fixes in 40autorandr; thanks to @rnav for spotting the issues 2016-07-29 19:48:06 +02:00
Phillip Berndt
ae2ea2b40c Remove leftover debug code 2016-07-28 19:37:13 +02:00
Phillip Berndt
d0fb527ffd Improve detection of $DISPLAY session owner
This closes bug #39.
2016-07-28 19:35:52 +02:00
Phillip Berndt
7f722b738c Merge pull request #51 from t0fik/xgd_compliant
Set default value of $XDG_CONFIG_DIRS to fulfill the standard
2016-07-06 14:46:49 +02:00
Jerzy Drozdz
6ed624aaa0 Set default value of $XDG_CONFIG_DIRS to be standard compliant 2016-07-05 07:34:29 +02:00
Phillip Berndt
7a41c28a93 Merge branch 'retry_commands' 2016-06-05 21:16:27 +02:00
Phillip Berndt
1aec0f4a2d udev requires pmutils as well (See issue #45) 2016-05-31 15:23:52 +02:00
Phillip Berndt
597feedca9 Added hint on hooks (related to bug #49) 2016-05-31 10:32:21 +02:00
Phillip Berndt
da23930cdb Add URL to error messages.
Far too many people report bugs for the Python version at
wertarbyte/autorandr.
2016-05-31 09:17:13 +02:00