]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
supplementary script to listen to lid events
authorChristophe-Marie Duquesne <chmd@chmd.fr>
Fri, 1 Nov 2019 13:19:41 +0000 (14:19 +0100)
committerChristophe-Marie Duquesne <chmd@chmd.fr>
Fri, 1 Nov 2019 13:19:41 +0000 (14:19 +0100)
contrib/listen_lid.sh [new file with mode: 0755]

diff --git a/contrib/listen_lid.sh b/contrib/listen_lid.sh
new file mode 100755 (executable)
index 0000000..976b26d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+#
+# /!\ You must be part of the input group
+# sudo gpasswd -a $USER input
+
+libinput debug-events | grep SWITCH_TOGGLE | while read event; do
+    autorandr --change --default default
+done