Remove unused cmus-mediakeys script
This commit is contained in:
parent
c689fa947a
commit
ffaa8dbe40
1 changed files with 0 additions and 32 deletions
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import osxmmkeys
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
commands = {
|
||||
'play_pause': '-u',
|
||||
'next_track': '-n',
|
||||
'prev_track': '-r'
|
||||
}
|
||||
|
||||
class CmusKeys():
|
||||
def __init__(self):
|
||||
def cmusRemote(command, flag):
|
||||
def f():
|
||||
print(command)
|
||||
subprocess.call(['cmus-remote', flag])
|
||||
return False
|
||||
return f
|
||||
|
||||
self.tap = osxmmkeys.Tap()
|
||||
for command, flag in commands.items():
|
||||
self.tap.on(command, cmusRemote(command, flag))
|
||||
|
||||
def run(self):
|
||||
self.tap.start()
|
||||
try:
|
||||
while True: time.sleep(1)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
self.tap.stop()
|
||||
|
||||
if __name__ == '__main__': CmusKeys().run()
|
Loading…
Reference in a new issue