desktop file: Actions=Play/Pause Next Previous StopĮxec=dbus-send -print-reply -dest= /org/mpris/MediaPlayer2 .PlayPauseĮxec=dbus-send -print-reply -dest= /org/mpris/MediaPlayer2 .NextĮxec=dbus-send -print-reply -dest= /org/mpris/MediaPlayer2 .PreviousĮxec=dbus-send -print-reply -dest= /org/mpris/MediaPlayer2 .Stop In the text editor window APPEND the following text underneath the existing test in the Spotify. ![]() Next open the file in Gedit (or a text editor of your choice): gedit ~/.local/share/applications/sktop To create add player controls to the Spotify dock item in Ubuntu first copy the Spotify desktop launcher to your local apps folder: cp /usr/share/applications/sktop ~/.local/share/applications/ desktop file located in /var/lib/snapd/desktop/applications and edit that instead. If you use the Spotify Snap app the same process also works, just copy the Spotify. It’s fine if you don’t this method will work with the official Spotify Snap too, you’ll just need to edit the. How to do itĪs I like to dramatically re-theme Spotify I use the Spotify app from the official Spotify repo rather than the Snap app. This will stop any future updates to Spotify from overwriting the changes you make. Though, as pointed out to me down in the comments, you may prefer copying the desktop file to your local directory first. The process is easy enough: open the sktop file in /usr/share/applications and paste in the relevant actions linking to the mpris2 controls. ![]() A few tweaks to that code was all it took to make it work in GNOME Shell and the Ubuntu Dock (though the player controls will also show in Dash to Dock, Dash to Panel, and many others). I read tutorial I wrote in 2016 about doing something similar with the Unity launcher. Now, I can right-click on the Spotify icon in the Ubuntu dock to access Play/Pause, Next, Prev, and Stop actions – no need to unfurl the notification shade to access the media player controls there, or try and refocus the app to take control. Without, and with: you can add these actions easily
0 Comments
Leave a Reply. |