Hi elconde,
Did you manage to do this?
I wanted this functionality also, and couldn't find anything to implement it so I wrote a script to do have Amarok pause on idle:
https://github.com/robertmuil/amarok-idle-pause
My idle-detection is just activity in Amarok itself (playlist change, volume change, skip back etc.).
Perhaps it can be useful to you.
Rob.