Skip to content

Instantly share code, notes, and snippets.

@steffex
Last active December 18, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steffex/5795022 to your computer and use it in GitHub Desktop.
Save steffex/5795022 to your computer and use it in GitHub Desktop.
pause spotify and start screensaver applescript. I use this in combination with the app "Spark", to run this script when I do alt+cmd+L
if appIsRunning("Spotify") then
tell application "Spotify" to pause
end if
tell application "System Events" to start current screen saver
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment