View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#83
Originally Posted by ruskie View Post
Reason is I ues xmms2 and that has a simple xmms2 togglepause command. No messing about with dbus and stuff.
Sure. We do this already for MPlayer using a named pipe (gitweb link). Ideally, the player should have a simple "pause" and not a "togglepause" signal, otherwise playback would start if it's paused and you unplug your headphones.

What I can offer is a directory like /etc/headphoned.d/ where other packages can install scripts that are executed when the headphones are unplugged. Would this be a workable solution for you?