From 455809c32db013b576e880139e30a7a0eee312bc Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Thu, 24 Nov 2016 17:40:31 +0100 Subject: [PATCH] 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. --- contrib/systemd/autorandr.service | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.2