[GNU/Linux] Muting everything but Anki when Anki is on the screen

Aleksej's Avatar


27 Feb, 2018 12:14 PM

Is it possible to do the following:

Let any non-Anki audio (either played by non-Anki software or by users that are not running Anki, or just by the user that is used for playing music) play only when I am not reviewing or editing cards right now.

So only Anki would play sounds when Anki is running and is on the screen, without me pausing the music every time. To mute other apps, Anki must at least be:

  • running;
  • not minimized;
  • on the active Xfce desktop (at least I don't use GNOME 3 because it doesn't support my custom keyboard layouts) — critical if muting everything, because I may be getting audio from the browser to put into a card;
  • The X console is active.

It could also be good to pause MPD when Anki becomes foreground and resume MPD when Anki becomes background. Actually, a simple way: an Anki add-on or an separate program checks if Anki is running and is not minimized, and when it is, sends "pause" to MPD, and when Anki is minimized or disappears, sends "resume" to the MPD it had paused recently enough.

Comments are closed, but you can start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac