]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/systemd/autorandr-lid-listener.service
25ba340ab1fc6f59fe2b2862e89e0642f88c1e91
[deb_pkgs/autorandr.git] / contrib / systemd / autorandr-lid-listener.service
1 [Unit]
2 Description=Runs autorandr whenever the lid state changes
3
4 [Service]
5 Type=simple
6 ExecStart=sh -c "stdbuf -oL libinput debug-events | egrep --line-buffered '^[[:space:]-]+event[0-9]+\\s+SWITCH_TOGGLE\\s' | while read line; do autorandr --batch --change --default default; done"
7 Restart=always
8 RestartSec=30
9 SyslogIdentifier=autorandr
10
11 [Install]
12 WantedBy=multi-user.target