]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - contrib/systemd/autorandr-lid-listener.service
Improvement of the regex performance for lid monitoring
[deb_pkgs/autorandr.git] / contrib / systemd / autorandr-lid-listener.service
index 7e4543832987280883d18467d00042e928e0f323..a6776ee887a93201b61996dc55cf109cbcfa3b2f 100644 (file)
@@ -3,7 +3,7 @@ Description=Runs autorandr whenever the lid state changes
 
 [Service]
 Type=simple
-ExecStart=bash -c "stdbuf -oL libinput debug-events | grep --line-buffered SWITCH_TOGGLE | while read line; do autorandr --batch --change --default default; done"
+ExecStart=bash -c "stdbuf -oL libinput debug-events | egrep --line-buffered '^ event[0-9]+\s+SWITCH_TOGGLE\s' | while read line; do autorandr --batch --change --default default; done"
 Restart=always
 RestartSec=30
 SyslogIdentifier=autorandr