]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/systemd/autorandr-lid-listener.service
Adding a systemd script to monitor lid changes
[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 | grep --line-buffered SWITCH_TOGGLE | 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