View Single Post
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#2
you need to define your own getActions() function.

heres an example that does the camerra hack {vol+ to take pictures in camera app} and play/pauses music using mplayer
Code:
def getActions():
  return [
    Action(volup, cond=appOnTop("camera-ui"),
      action=cmd("xresponse -d 820x240,820x240 -w 1")),

    Action(volup, cond=screenLocked,
      action=cmd(
         "killall mplayer || " +
         "find ~/MyDocs/Music -iname *.mp3 -print0 | " +
         "xargs -0 mplayer"))
  ])
 

The Following 5 Users Say Thank You to wolke For This Useful Post: