0
INDEX
… quand Spotify tourne
Ouvrir un Terminal et taper :
cd /Applications/iTunes.app/Contents/MacOS sudo mv iTunes iTunesX sudo curl https://www.ast.cam.ac.uk/~app26/itunes/iTunes -O sudo chmod uog+x iTunes
Contenu du fichier à curler au cas où celui-ci viendrait à disparaître :
#!/usr/bin/env python import sys, os, subprocess launch = True ps = subprocess.Popen("/bin/ps -x", shell=True, stdout=subprocess.PIPE) for l in ps.stdout.read().split("\n") : if "Spotify" in l : launch = False ps.stdout.close() if launch : os.spawnvp(os.P_WAIT, '/Applications/iTunes.app/Contents/MacOS/iTunesX',sys.argv) else : print "Not launching iTunes while spotify is running"
Fichier permettant de passer un array d’applications bloquantes :
(se trouve à https://www.cs.umd.edu/ dmonner/iTunes)
#!/usr/bin/env python import sys, os, subprocess launch = True blocker = "" apps = ["Spotify", "Songbird"] ps = subprocess.Popen("/bin/ps -x", shell=True, stdout=subprocess.PIPE) for line in ps.stdout.read().split("\n"): for app in apps: if app in line: launch = False blocker = app ps.stdout.close() if launch : os.spawnvp(os.P_WAIT, '/Applications/iTunes.app/Contents/MacOS/iTunesX', sys.argv) else : print "Not launching iTunes while %s is running." % blocker
Voir en ligne : Source
DATE 24 Juin 2010