mirror of
https://github.com/phillipberndt/autorandr
synced 2025-02-17 03:56:56 +00:00
Adding a systemd script to monitor lid changes
This commit is contained in:
parent
17aacb0185
commit
5366a5dc37
12
contrib/systemd/autorandr-lid-listener.service
Normal file
12
contrib/systemd/autorandr-lid-listener.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Runs autorandr whenever the lid state changes
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=bash -c "stdbuf -oL libinput debug-events | grep --line-buffered SWITCH_TOGGLE | while read line; do autorandr --batch --change --default default; done"
|
||||||
|
Restart=always
|
||||||
|
RestartSec=30
|
||||||
|
SyslogIdentifier=autorandr
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user