yavdr-ansible/roles/yavdr-xorg/templates/systemd/user/detect-second-display.service.j2
2017-06-21 10:14:35 +02:00

10 lines
274 B
Django/Jinja

[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