How To: Quickly Restart Spotify or any other App! (Mac Services and Shortcuts)

Every once in a while Spotify glitches out and it won’t play any song and I need to restart it which involved right clicking on the icon and force quitting/quitting. I figured there had to be an easier way. Lo and behold I found macOS services and shortcuts! Kinda tricky to use and a bit glitchy (see below as to why my shortcut wouldn’t work)

Setting up Automator in Mojave

  • Open Automator
  • File> New> Quick Action > Choose
  • Select Utilities on left side
  • Double click on  Run Shell Script to add it to the panel on the right
  • Workflow receives current: No Input in any application
    • killall Spotify; open /Applications/Spotify.app/

Setting up the Shortcut

  • Go to System Preferences>Keyboard>Shortcuts
  • Select “Services” and find “Restart The Spotify” under General
  • Enable and select shortcut you want to use, Mine is CTRL+ALT+CMD+S
Figure 2. System Preferences Shortcut

If Shortcut is not working!

  • If you originally set the service to take input, it will show up under the Text category in shortcuts, you want it to be in General so go in to Automator , have it take No Input and rename the service so that macOS re-categorizes it.
Service Input is incorrect (should have no input) and therefore it’s in the wrong place in Shortcuts(Text Category) and won’t work correctly

Source: https://apple.stackexchange.com/questions/324060/how-do-i-run-my-automator-service-without-opening-automator

Source: https://appleinsider.com/articles/18/03/14/how-to-create-keyboard-shortcuts-to-launch-apps-in-macos-using-automator