]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - contrib/etc/xdg/autostart/autorandr-lid-listener.desktop
adding a lid listener xdg/autostart service
[deb_pkgs/autorandr.git] / contrib / etc / xdg / autostart / autorandr-lid-listener.desktop
diff --git a/contrib/etc/xdg/autostart/autorandr-lid-listener.desktop b/contrib/etc/xdg/autostart/autorandr-lid-listener.desktop
new file mode 100644 (file)
index 0000000..48c7fc8
--- /dev/null
@@ -0,0 +1,6 @@
+[Desktop Entry]
+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"
+X-GNOME-Autostart-Phase=Initialization