]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/systemd/autorandr-lid-listener.service
Merge pull request #169 from chmduquesne/closed_lid_treated_as_disconnected
[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=bash -c "stdbuf -oL libinput debug-events | egrep --line-buffered '^ 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