1

The new Snap for foobar2000 works excellent, and frankly makes installing foobar2000 on Ubuntu tons of easier.

enter image description here

But as expected, the "Global hotkeys" option for using Keyboard Shortcuts when minimizing doesn't work.

enter image description here

Before Snap, it was quite easy to overcome this using Wine commands like this:

enter image description here

and adding that command as a keyboard shortcut:

enter image description here

So,

Is there a way to do something like this with Snap software?

1 Answer 1

1

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.

[Desktop Action PlayPause]
Name=Play/Pause
Exec=foobar2000 -playpause

[Desktop Action Stop]
Name=Stop
Exec=foobar2000 -stop

[Desktop Action Next]
Name=Next
Exec=foobar2000 -next

[Desktop Action Prev]
Name=Prev
Exec=foobar2000 -prev

[Desktop Action Random]
Name=Random
Exec=foobar2000 -rand

[Desktop Action Config]
Name=Preferences
Exec=foobar2000 -config

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

1
  • Thanks! I'm still not that literate on Linux. This is exactly what I was looking for :) Apr 2, 2019 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .