gnome お気に入りの状況に合わせたメニューで Spotify(次、前など)を制御

gnome お気に入りの状況に合わせたメニューで Spotify(次、前など)を制御

Spotifyランチャーを追加しましたGNOMEシェルダッシュだから今はお気に入りのアプリになりました。コンテキストメニュー
に次/前/再生/一時停止/停止コマンドを追加するには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

おすすめ記事