The new Snap for foobar2000 works excellent, and frankly makes installing foobar2000 on Ubuntu tons of easier.
But as expected, the "Global hotkeys" option for using Keyboard Shortcuts when minimizing doesn't work.
Before Snap, it was quite easy to overcome this using Wine commands like this:
and adding that command as a keyboard shortcut:
So,
Is there a way to do something like this with Snap software?
Thanks to how the snap has been prepared, this is easy to realize.
The snap package of Foobar defines several contextual actions for the launcher. Inspecting the launcher,
/snap/foobar2000/242/usr/share/applications/foobar2000.desktop
, you can see the command you can use to implement these global shortcut. This is the relevant section of the .desktop file.The command
which foobar2000
shows you that the executable is located in/snap/bin
. To define your shortcut to start/pauze playing, use the command/snap/bin/foobar2000 -playpause