]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - contrib/etc/xdg/autostart/autorandr-lid-listener.desktop
Improvement of the regex performance for lid monitoring
[deb_pkgs/autorandr.git] / contrib / etc / xdg / autostart / autorandr-lid-listener.desktop
index 48c7fc80315908de96d749ffabdb29b2e1eecda7..9d16f07f98c6dce6300412ed8887f37860cf6b26 100644 (file)
@@ -2,5 +2,5 @@
 Name=Autorandr Lid Listener
 Comment=Trigger autorandr whenever the lid state changes
 Type=Application
-Exec=bash -c "stdbuf -oL libinput debug-events | grep --line-buffered SWITCH_TOGGLE | while read line; do autorandr --change --default default; done"
+Exec=bash -c "stdbuf -oL libinput debug-events | egrep --line-buffered '^ event[0-9]+\s+SWITCH_TOGGLE\s' | while read line; do autorandr --change --default default; done"
 X-GNOME-Autostart-Phase=Initialization