]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/listen_lid.sh
Merge branch 'master' into master
[deb_pkgs/autorandr.git] / contrib / listen_lid.sh
1 #!/bin/sh
2 #
3 # /!\ You must be part of the input group
4 # sudo gpasswd -a $USER input
5
6 stdbuf -oL libinput debug-events | \
7     grep -E --line-buffered '^[[:space:]-]+event[0-9]+[[:space:]]+SWITCH_TOGGLE[[:space:]]' | \
8     while read line; do
9     autorandr --change --default default
10 done