This repository has been archived on 2026-10-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
omarchy-pkgs/pkgbuilds/spotify/spotify.sh
T
2025-10-26 19:37:20 -04:00

14 lines
486 B
Bash

#!/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
mapfile -t SPOTIFY_USER_FLAGS <<< "$(grep -v '^#' "${XDG_CONFIG_HOME}/spotify-flags.conf")"
echo "User flags:" "${SPOTIFY_USER_FLAGS[@]}"
fi
# Launch Spotify with the given flags
exec /opt/spotify/spotify "${SPOTIFY_USER_FLAGS[@]}" "$@"