]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - contrib/listen_lid.sh
Merge branch 'master' into master
[deb_pkgs/autorandr.git] / contrib / listen_lid.sh
index 7288490d05c94064c22eaec5995ef18ea23c5ddf..8de7eb64e8dfc1ab9c4b4c0d0205f60d4769a8da 100755 (executable)
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 #
 # /!\ You must be part of the input group
 # sudo gpasswd -a $USER input
 
 stdbuf -oL libinput debug-events | \
-    egrep --line-buffered '^ event[0-9]+\s+SWITCH_TOGGLE\s' | \
+    grep -E --line-buffered '^[[:space:]-]+event[0-9]+[[:space:]]+SWITCH_TOGGLE[[:space:]]' | \
     while read line; do
     autorandr --change --default default
 done