Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compliments! A great alternative to quirky self-built solution: Hotkey > Service > AppleScript app bundle #8

Open
porg opened this issue Aug 12, 2021 · 0 comments

Comments

@porg
Copy link

porg commented Aug 12, 2021

Great app!

👍 Does just what I want!

User need

The reason why I wanted to direct volume control of Apple Music app via hotkey is because streaming to my Airplay device directly from Apple Music uses way less bandwidth (=exactly the bitrate of the MP3/AAC file you are streaming plus some control data) instead of when setting the system output to airplay (=a high bitrate audio mix from all your audio sources, including system and app beep sounds, etc) where one has the convenient Volume hotkeys on my keyboard readily available.

My workaround so far was

Direct Apple Music control by a self-built solution which was far less CPU efficient, more glitchy, and less integrated!

  • System Preferences > Keyboard > Shortcuts > Services > General
    • Music Volume - (Service): F11 (You get this by Fn + Vol-)
    • Music Volume + (Service): F12 (You get this by Fn + Vol+)
  • These each triggered the corresponding Automator Service in ~/Library/Services
    • They just were wrappers which used the task "Launch Application"
  • Then at /Application/Scripts I had the corresponding AppleScripts saved as .app bundles
    • They remote control Apple Music.

Reason for this setup

  • At first use you must grant "Music Volume -.app" the permission to remote control "Music.app" but from then on its remembered.
  • If you put the AppleScript code directly into the service, then you must grant permission to remote control "Music.app" in each app from which you trigger the hotkey!
    • 👎 Crazy unconvenient for a hotkey solution.
    • 👎 And also a unnecessary burden on the security catalog system. (More rules to check overally makes it slower over time)

Additional downsides

  • 👎 Used far more CPU
  • 👎 Took about half a second in which you quickly saw your app loosing focus, the AppleScript app shortly flashing the menu bar, then returning focus to your current app
  • 👎No nice notification. You could use the AppleScript "notification" verb, but these general notification for a quick control like music volume +/- are far to distractive on screen (too long, not centered but sliding in from the right on top)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant