#!/bin/bash
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
FLAT_FILE=${XDG_CONFIG_HOME}/lx-music-desktop-flags.conf

# Allow users to override command-line options
if [[ -f ${FLAT_FILE} ]]; then
    mapfile -t _USER_FLAGS < <(sed 's/#.*//' "${FLAT_FILE}" | tr '\n' ' ')
fi

exec /usr/bin/electron37 /usr/lib/lx-music-desktop/app.asar "" "${_USER_FLAGS[@]}"
