[Unit]
# REQUIRED: without a window manager, SDL never receives focus and TF2 ignores
# all synthesized keyboard input, so the menu driver can never reach spectator.
Description=TF2 stream - window manager
After=tf2-xvfb.service
Requires=tf2-xvfb.service

[Service]
Type=simple
Environment=DISPLAY=:55
ExecStartPre=/bin/sh -c 'for i in $(seq 1 30); do xdpyinfo -display :55 >/dev/null 2>&1 && exit 0; sleep 1; done; exit 1'
ExecStart=/usr/bin/openbox
Restart=always
RestartSec=3

[Install]
WantedBy=default.target
