diff options
Diffstat (limited to 'spotify.sh')
-rw-r--r-- | spotify.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spotify.sh b/spotify.sh new file mode 100644 index 000000000000..8ee5f63fa953 --- /dev/null +++ b/spotify.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Substitute XDG_CONFIG_HOME by ~/.config if the env var is unset or empty +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config} + +# Allow users to override command-line options +if [[ -f "${XDG_CONFIG_HOME}/spotify-flags.conf" ]]; then + SPOTIFY_USER_FLAGS="$(grep -v '^#' "${XDG_CONFIG_HOME}/spotify-flags.conf")" + echo "User flags: ${SPOTIFY_USER_FLAGS}" +fi + +# Launch Spotify +exec /opt/spotify/spotify "${SPOTIFY_USER_FLAGS}" "${@}" |