-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Apps in spotlight #188
Apps in spotlight #188
Conversation
Sahweet. You're now in my bitcoin-qt address book. Just sent you a beer :) Also: https://twitter.com/patconnolly/status/320693929018273793 |
There seems to be no objections, I say “do it”. |
Sounds good. I'm not against the move to /opt if it's the best way to handle this but I do wonder if there isn't a way to change system settings somehow to get spotlight to properly index the current location. Having everything under /usr/local is kind of nice. |
Maybe this is already known but if you do a spotlight search (through Finder), hit +, change the first pulldown (should say 'Kind') to 'Other…' and select 'System files' and the second pulldown to 'are included', then if you do a search for an app you have installed in /usr/local/Caskroom, it will show up. I don't know much about how spotlight works under the hood but this suggests to me that there may be some way to get this to work by default through a configuration setting. |
@darinmorrison thanks for those instructions - that explanation makes sense. Unfortunately from all my research I have not been able to find a way to add items to Spotlight programmatically. After all the hours I've spent scouring the internet and coding up workaround solutions (Finder Alias, Appify), I think I've settled on moving to I'd welcome anyone else who'd like to jump in on this, but for now I'm going to be done messing with this nasty closed-off area of the Apple kingdom. :) 🍎 👉 💣 |
😍 🍻 Thanks @phinze !! |
@phinze totally understand. FWIW, I spent some time digging around to see what I could come up with. Something like the following should work but I can't seem to get it to, at least on 10.8.3. NOTE: If you want to play around with it, backup $SPOTLIGHT_SETTINGS before. If you run --unmodify before --modify, it will trash some settings. A better way would be to make a backup of the original file and then restore it. #!/bin/bash
SPOTLIGHT_SETTINGS="/System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist"
function modify_spotlight
{
# use PlistBuddy to modify the default spotlight search settings
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0 dict" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:rowType integer 0" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:displayValues array" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:displayValues: string \"SEARCH_SYSTEM_FILES\"" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:displayValues: string \"YES\"" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:subrows array" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:criteria array" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:criteria: string \"com_apple_SearchSystemFilesAttribute\"" $SPOTLIGHT_SETTINGS
sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:FXCriteriaSlices:0:criteria: integer 1220" $SPOTLIGHT_SETTINGS
}
function unmodify_spotlight
{
# use PlistBuddy to unmodify the default spotlight search settings
sudo /usr/libexec/PlistBuddy -c "Delete :SearchCriteria:FXCriteriaSlices:0" $SPOTLIGHT_SETTINGS
}
function usage
{
echo "usage: $0 [--modify | --unmodify]"
}
case $1 in
-m | --modify ) modify_spotlight
;;
-u | --unmodify ) unmodify_spotlight
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac |
downgrade keepassx2 (alpha) to keepassx0 (old)
Alright folks. Here's a PR for commentary.
This addresses both #99 and #143 - and possibly a few more I'm missing.
Caskroom
to fix Applications don't appear in spotlight #99 - spotlight picks up apps in/opt/
just fine we get that for free without any fancylinkapps
ing.Please comment and question and poke and prod here and once we all feel good we can merge!
🔍 🔎 🔍 🔎