Follow the steps below for each script: (i.e. Power on, and power off)
- Open Automator
- Create a new Quick Action
- Add "Run Shell Script" to the workflow
- Select "no input" in "any application"
- Paste one of the scripts below (minus the shebang line) into the shell script window
- Set
DEVICE_HOSTNAME
to the value of the Roku TVs hostname - Select "/bin/sh" as the shell
- Test your automation
- Save it with the desired name
Next, follw these steps to attache dthe automations to a keyboard shortcut:
- Open System Preferences > Keyboard > Shortcuts
- Select Services
- Scroll down to General
Each of the autoamtions should be checked. Now, assign your desired shortcut key.
This portion should easily automated with default read ~/Library/Preferences/pbs.plist NSServicesStatus
and /usr/libexec/PlistBuddy --help
on macOS Bug Sur at least...