]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/listen_lid.sh
account for occasional dash prefix, use sh
[deb_pkgs/autorandr.git] / contrib / listen_lid.sh
1 #!/bin/bash
2 #
3 # /!\ You must be part of the input group
4 # sudo gpasswd -a $USER input
5
6 stdbuf -oL libinput debug-events | \
7     egrep --line-buffered '^ event[0-9]+\s+SWITCH_TOGGLE\s' | \
8     while read line; do
9     autorandr --change --default default
10 done