]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
account for occasional dash prefix, use sh
authorVladimir-csp <vladimir-csp@yandex.ru>
Wed, 13 Nov 2019 19:40:27 +0000 (22:40 +0300)
committerGitHub <noreply@github.com>
Wed, 13 Nov 2019 19:40:27 +0000 (22:40 +0300)
contrib/listen_lid.sh

index 7288490d05c94064c22eaec5995ef18ea23c5ddf..6daad5375feb5b9804a44bb8194c68a988577ef3 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' | \
+    egrep --line-buffered '^[\s-]+event[0-9]+\s+SWITCH_TOGGLE\s' | \
     while read line; do
     autorandr --change --default default
 done