You are not logged in.
Many applications do not natively support play/pause and stop keys; but they do support control from the command line. What I did was to create a script which would be called everytime the multimedia button would be pressed; and according to which application is active, that action would be applicable to that app.
#!/bin/bash
# Program to toggle playing in whichever application
# is the focussed one.
# Abhishek Dasgupta <abhidg@gmail.com>
focus=`xdpyinfo | grep focus | cut -c 16-24`
info=`xprop -id $focus | grep WM_CLASS | cut -c 20-`
if [[ "$info" =~ .*Audacious.* ]]
then
audacious --play-pause
elif [[ "$info" =~ .*Totem.* ]]
then
totem --play-pause
else
mpc toggle
fi
Hope it will be useful to some of you
Offline