Exemplo n.º 1
0
 def is_running(self):
     processes = process_stdout(["ps", "-A", "-o",
                                 "cmd"]).decode('ascii',
                                                errors="ignore").split("\n")
     return len([
         p for p in processes
         if (p.startswith("python") and ("quodlibet" in p))
     ]) > 0
Exemplo n.º 2
0
 def is_playing(self):
     info = process_stdout(["mocp", "-i"])
     return STATE_PLAY in info
Exemplo n.º 3
0
 def is_paused(self):
     info = process_stdout(["mocp", "-i"])
     return STATE_PAUSE in info
Exemplo n.º 4
0
 def is_stopped(self):
     info = process_stdout(["mocp", "-i"])
     return STATE_STOP in info
Exemplo n.º 5
0
 def is_playing(self):
     return process_stdout(["banshee", "--query-current-state"]).strip() \
         ==  "current-state: playing"
Exemplo n.º 6
0
 def is_stopped(self):
     return process_stdout(["banshee", "--query-current-state"]).strip() \
         ==  "current-state: idle"
Exemplo n.º 7
0
 def is_playing(self):
     return process_stdout([
         "quodlibet", "--status"
     ]).decode('ascii').strip().split(' ')[0:1] == ["playing"]