Jump to content

URL Scheme (or other method) to open Alfred's Preferences e.g. to the "Features → Clipboard History" section?


Recommended Posts

Until there's a better way, I came up with this poor man's solution... 

🤷

 

#!/usr/bin/env bash

# quits Alfred Prefs (if open) and then opens it to the Features -> Clipboard tab

bid='com.runningwithcrayons.Alfred-Preferences'

osascript <<EOS &>/dev/null
with timeout of 5 seconds
  tell application id "$bid" to quit
end timeout
EOS

defaults write $bid lastFeature clipboard
defaults write $bid lastTab features
open -b $bid

 

Edited by luckman212
Link to comment

Hi @vitor !

 

The use case is I have a script that does some processing on recent files that are in the clipboard history. For the script filter to work, that feature needs to be enabled. I was able to figure out how to programmatically check for that, but to close the loop I'd like the "action" item from that script filter to directly open Alfred Prefs to the page so the user can enable the checkbox.

 

Indeed, ?clipboard does take me to the correct place! But I was hoping the script could open this for the user automatically. I assume there's probably an undocumented URL scheme available, since I guess that might be how Alfred gets the separate Alfred Preferences.app to open directly to that specific page.

Edited by luckman212
Link to comment
  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...