#! /usr/bin/env bash

# {{ ansible_managed }}

source "{{ item.home }}/{{ item.env }}"

# If X11 forwarding is enabled, then use the DISPLAY value
# already set and use the X11 session cookie
if [ -n "$DISPLAY" ]; then
    export XAUTHORITY="{{ localdev_xauthority }}"

# Otherwise, configure the display to use the virtual frame buffer
else
    export DISPLAY="{{ localdev_xvfb_display }}"
fi

cd "{{ item.home }}/{{ item.repo }}"
