Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
450 stars 141 forks source link

RFE: Seal apps search paths should be configurable #125

Open junkblocker opened 5 years ago

junkblocker commented 5 years ago

Currently seal apps module has a hardcoded searchpath which can't be changed after the module is loaded. This prevents customizations and fixes at user's end e.g. for adding /usr/local/Caskroom or any custom paths, I'd have to edit my own copy of Seal spoon to include it.

cmsj commented 5 years ago

Agreed. It could technically be exposed as a variable immediately, but it wouldn't be able to take effect because the hs.spotlight searcher starts as soon as the module is loaded. I'd guess the smart move here would be to refactor the spotlight searcher into a function so we can start it at load time, but then let the user restart it if they change the search paths.

cmsj commented 5 years ago

I've just uploaded a new version of Seal which really ought to make this work, but for a reason that currently escapes me, clearing out the Spotlight cache and creating a new hs.spotlight object, is still somehow leaving results available in Seal.