Jump to content

How to search through system preferences submenus with Alfred? [Question on Reddit]


Recommended Posts

Does anyone know if there is a way or workflow to search through the system preferences submenus with alfred like spotlight can? For example, if I search "Filevault" in spotlight, the System and Privacy tab shows up. But if I try the same in Alfred it doesn't find anything. Same thing happens with any other submenus. The higher level system preferences tabs do show up if I search them directly (like “keyboard”) but nothing within them, like searching “shortcuts” brings up keyboard in spotlight but not in Alfred. Is there a setting or workflow that can do that? Thanks.

 

[Note: this was crossposted from this Reddit post]

Link to comment

System Preferences (i.e. pre-Ventura) are quite automatable with AppleScript, but System Settings (i.e. in Ventura) so far are not. That said, making a workflow for it should be doable, even without code! Many Preference panes can be opened with the x-apple.systempreferences: URL handler. Meaning that an Open URL Action set to open x-apple.systempreferences:com.apple.preference.security?FDE will open Security & Privacy (Privacy & Security on Ventura) in the FileVault Tab. You’ll even see the Open With dropdown reflect that System Preferences will open.


To make a codeless workflow for this, one would use a List Filter Input to add every preference and have the corresponding URL handler as the Arg. Then connect that to an empty Open URL Action.


Of course, one has to figure out which URLs are valid, but there are mutiple lists online.

 

I’m open to doing it If I’m pinged about it after Ventura has been out and stable for a few weeks. You might’ve seen some of the myriad posts and tweets decrying the current buggy state of the new System Settings app.

Link to comment

I have run up a workflow here on Github called Open macOS 12 pref panes.

 

The workflow lists various System Preferences panes and you can select any of them to open the relevant pane.

527363439_Screenshot2022-10-14at10_19_29.thumb.png.6cd6db0e76d26ade0f31829cd9aa0cf2.png

Please note the workflow has been tested on macOS 12.6 and is not guaranteed to work on earlier macOS versions. It will almost certainly fail miserably on macOS Ventura when that is released and is thus already living out its twilight days.

 

I have not the slightest doubt Vitor will in due course put it to shame with something effortlessly more elegant for Ventura. 😀

 

Stephen

 

 

Link to comment

The ones accessible with x-apple.systempreferences: should still work in Ventura. I haven’t tested them all but they worked in earlier betas and should continue to be supported. In the first betas there was a wrong one (pointed to the wrong tab) which they fixed. Some may have changed, though.

Link to comment
9 hours ago, vitor said:

 

That’s a good call! I don’t run beta macOS versions on my main machine either, I’ve tested it via Virtual Machines.

@vitor what virtual machine software do you use? VMware / Parallel? For me, macOS has not given many issues in the late beta stage. But proper official updates of MS Onedrive have been messy two times this year

Link to comment
On 10/14/2022 at 2:50 PM, Stephen_C said:

I have run up a workflow here on Github called Open macOS 12 pref panes.

 

The workflow lists various System Preferences panes and you can select any of them to open the relevant pane.

527363439_Screenshot2022-10-14at10_19_29.thumb.png.6cd6db0e76d26ade0f31829cd9aa0cf2.png

Please note the workflow has been tested on macOS 12.6 and is not guaranteed to work on earlier macOS versions. It will almost certainly fail miserably on macOS Ventura when that is released and is thus already living out its twilight days.

 

I have not the slightest doubt Vitor will in due course put it to shame with something effortlessly more elegant for Ventura. 😀

 

Stephen

 

 

I tested it on Ventura 13.0 beta 9. First, three options accessibility, Apple ID, and battery works fine. From Bluetooth onwards, it doesn't work. Error message for reference: 

 

ERROR: Open macOS 12 pref panes[Run Script] /Users/xxx/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/28BAF82F-27F6-43F2-889C-1C5F95C8131E:97:137: execution error: System Settings got an error: AppleEvent handler failed. (-10000)

 

I can test it further as and when update is available in future.

 

 

 

Link to comment
1 hour ago, TomBenz said:

From Bluetooth onwards, it doesn't work.

I suspect you may need to carry out more thorough testing. On the basis of Vitor's earlier comment there should be a number of other panes that do work under Ventura (Family sharing, Filevault tab, Firewall tab, Focus and quite a few others). Note Vitor's comment for the reason why. What is really needed is a rigorous test to confirm that, at least, all those accessible with x.apple.systempreferences: still work.

 

Stephen

Link to comment

@Stephen_C This is looking like a good addition to the Gallery. I’ll make two small suggestions:

  1. Updating the icon. Currently It has small white corners which make it look like a screenshot. Note you can drop an app anywhere Alfred takes an icon and it’ll use its icon.
  2. Rename to “Open Settings Panes” or similar. Mentioning macOS 13 will be outdated in under a year (next WWDC) but it is likely it the workflow will continue to work then. If any version should have a number is the old one.

Link to comment

@Stephen_CThanks for this workflow, works great!

 

Do you think it is possible to extend the workflow to open sub-submenus?
For example, after searching for `Keyboard`, pressing ↵ could open the settings submenu as of now, but pressing e.g. ⌘↵ could open another List filter that shows and opens all submenus of `Keyboard` such as `Keyboard Shortcuts`, `Text Replacements...`, etc.

 

The ability to open any Settings menu via Alfred would be amazing 🤗 

Link to comment
8 hours ago, jjaybe said:

Do you think it is possible to extend the workflow to open sub-submenus?

 

@jjaybe I'm afraid that's not currently feasible. It's not possible to add further panes unless we can discover the appropriate identifier for accessing those additional panes. At present I'm not aware of any workable way of doing that, sorry. (If you look at the workflow configuration you'll see a link to a Github post showing, effectively, how the existing identifiers were discovered but that seems to be the limit of people's knowledge and abilities at present.)

 

Stephen

Link to comment

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...