gnome 즐겨찾기의 상황에 맞는 메뉴를 통해 Spotify(다음, 이전 등) 제어

gnome 즐겨찾기의 상황에 맞는 메뉴를 통해 Spotify(다음, 이전 등) 제어

Spotify런처를 추가 했습니다그놈 쉘 대시그래서 지금은 즐겨찾는 앱이 되었습니다. 상황에 맞는 메뉴
에 다음/이전/재생/일시 중지/중지 명령을 추가하는 방법은 무엇입니까 Spotify?


여전히 불분명하다고 생각하는 사람들을 위해 여기서 목표는 다음과 같은 것을 갖는 것입니다.

여기에 이미지 설명을 입력하세요.

답변1

답을 찾기 위해 시간을 보낸 후에 마침내 성공했습니다.

spotify.desktop파일을 편집하면 됩니다/usr/share/applications

여기에 이미지 설명을 입력하세요.

[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=spotify %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;

Actions=PlayPause;Next;Previous;Stop

[Desktop Action PlayPause]
Name=Play-Pause
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

[Desktop Action Next]
Name=Next
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

[Desktop Action Previous]
Name=Previous
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

[Desktop Action Stop]
Name=Stop
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop

관련 정보