mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-19 16:38:01 +00:00
Closes: https://bugs.gentoo.org/966283 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
30 lines
1 KiB
Bash
30 lines
1 KiB
Bash
#!/bin/sh
|
|
|
|
export LD_LIBRARY_PATH="/usr/lib64/apulse"
|
|
|
|
if command -v spotify-dbus.py > /dev/null; then
|
|
echo "Launching spotify with Gnome systray integration."
|
|
spotify-dbus.py "$@"
|
|
else
|
|
if pgrep -f "Spotify/[0-9].[0-9].[0-9]" > /dev/null; then
|
|
busline="org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri ${1}"
|
|
echo "Spotify is already running"
|
|
echo "Sending ${busline} to dbus"
|
|
if command -v qdbus6 &> /dev/null; then
|
|
qdbus6 $busline
|
|
exit
|
|
elif command -v qdbus &> /dev/null; then
|
|
qdbus $busline
|
|
exit
|
|
fi
|
|
if command -v dbus-send &> /dev/null; then
|
|
dbus-send $busline
|
|
exit
|
|
fi
|
|
echo "No bus dispatcher found."
|
|
else
|
|
echo "Neither gnome-integration-spotify nor spotify-tray are installed."
|
|
echo "Launching spotify without systray integration."
|
|
exec "/opt/spotify/spotify-client/spotify" --no-zygote "$@"
|
|
fi
|
|
fi
|