yavdr-ansible/roles/yavdr-xorg/templates/systemd/user/detect-second-display.service.j2

10 lines
274 B
Plaintext
Raw Normal View History

2017-06-21 10:14:35 +02:00
[Unit]
Description=Detect second DISPLAY using xrandr
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'export DISPLAY=$DISPLAY.1; xrandr -q | grep "connected" && echo "DISPLAY=$DISPLAY" > ~/.second_display || rm -f ~/.second_display'
[Install]
WantedBy=yavdr-desktop.target