]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
systemd unit: Rate limit execution
authorPhillip Berndt <phillip.berndt@googlemail.com>
Thu, 24 Nov 2016 16:40:31 +0000 (17:40 +0100)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Fri, 20 Jan 2017 14:14:15 +0000 (15:14 +0100)
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.

contrib/systemd/autorandr.service

index d9708af49c51ee4b3d4b816389408323fe2d07f2..74a78de796bd112d670b2b4462d142a317950ca6 100644 (file)
@@ -1,6 +1,8 @@
 [Unit]
 Description=autorandr execution hook
 After=sleep.target
+StartLimitInterval=5
+StartLimitBurst=1
 
 [Service]
 ExecStart=/usr/bin/autorandr --batch --change --default default