From: Phillip Berndt Date: Thu, 24 Nov 2016 16:40:31 +0000 (+0100) Subject: systemd unit: Rate limit execution X-Git-Tag: 1.1~6^2~3 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=455809c32db013b576e880139e30a7a0eee312bc;hp=ae1f18a06039ea2e9fae5a2729cf674f155f6139 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. --- diff --git a/contrib/systemd/autorandr.service b/contrib/systemd/autorandr.service index d9708af..74a78de 100644 --- a/contrib/systemd/autorandr.service +++ b/contrib/systemd/autorandr.service @@ -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