-
-
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
Applications don't appear in spotlight #99
Comments
I can't remember whether this was brought up anywhere, but finder aliases will still show up in spotlight, albeit as "Documents". If this is worth pursuing, then aliases can be created programmatically through applescript, which can be run from a single terminal command: http://macstuff.beachdogs.org/blog/?p=37 |
Better yet, we could use appify (or port it to Ruby) to create |
Hm. I like that! 👍 Might be helpful to port to ruby, and then we could probably grab the icon somehow too |
OK, I ported it to ruby in its own Gem: https://rubygems.org/gems/appify require 'appify'
app = Appify::App.new
app.run = "#!/bin/bash\nopen #{cask.destination_path}/#{file}.app"
app.write Cask.appdir.join "#{file}.app"
# done. I might just improve the gem a bit so it can support adding and reading custom metadata (so we can manage the cask aliases more effectively) and icons (everybody loves pretty shiny things). But, just yet, as a proof-of-concept, it doesn't look too bad, huh?
|
Nice!! This is effin awesome. I could kiss you @passcod, if there wasn't all this internet between us! Count your lucky stars |
Hey @passcod, I don't suppose the code for the appify port is on github? |
It's not, actually. You can get at it by expanding the gem... it's in a git repo on my home box, I'll push it up this afternoon. |
Oh I stumbled across a simpler and potentially cleaner solution to this the other day. Homebrew recently incorporated code to make a "Finder alias" when linking, which allows spotlight to find apps properly. https://github.com/mxcl/homebrew/pull/14821/files Seems simple enough to suit our needs. I was going to give it a shot this week. Thoughts? |
Wow magic prefix! This is cool. Definitely simpler and Homebrew-supported == free work :) |
Haven't tested yet, but appears that Aliases alone might not solve the spotlight launching issue: |
Just tested locally, Works for me ™️ More specifically, I tried:
And:
Spotlight has them showing up under "Documents", but selecting them does indeed launch. |
Nice! cc @cunnie Does that solve the use-case satisfactorily? |
++ |
Hi there! I've been using this rudimentary AppleScript as a workaround to make the aliases to all my Cask apps: I just wonder... |
@phinze can we get a reply on your thoughts about finder aliases (via applescript) vs "real" apps (appify). It seems spotlight will show finder aliases as "documents" whereas appify converts them to something that is recognized as "Applications". Is this not a reason to use appify? I can understand if you think it deserves a new issue for the enhancement, but wondering if you think it's a valid concern. (I believe apps show up first in spotlight.) Thanks. |
Sorry @patcon - I've been doing a lot of hacking this past week but I should have been writing more about it. :) I set out this last week to get this issue solved once and for all: I spent some time trying to get the appify strategy up and running consistently, and for the life of me I could not get it to work. I consistently got the PowerPC error [1]. So I turned my attention to the Finder Alias strategy, which I had success with (albeit with the Document caveat). I spent a buttload of time fighting the AppleScript layer - which seems to be the only reliable way to get OS X to create Finder Aliases. So I have a working implementation of that on my branch, but the behavior is being so finicky that I don't feel comfortable merging it [2]. Now I have one more path I stumbled on along the way. I recently switched to Boxen on my laptop, which moves the Homebrew tree under So I'm going to try on another branch simply moving the Caskroom to We'll beat this issue soon I swear! 👊 [1] Reported here https://gist.github.com/mathiasbynens/674099/#comment-592022 and several other places |
Oh man, I apologize if I seemed ungrateful for all the work you've done one this -- I've been totally MIA from pivotal_workstation/homebrew-cask lately, so I do appreciate it! Hey, I don't suppose you have a bitcoin wallet that I could tip? Regardless, thanks for the update! |
Hey hey hey! Things are finally looking okay! Check out #188 and say what you have to say! @patcon no worries whatsoever. i've been wanting to try out bitcoin! i set up a thing here http://phinze.com/bitcoin |
…hon27-caveats Use caveats DSL in Paraview Lion Python 2.7.
Pivotal folks have brought this issue up. Needs fixing!
It seems spotlight may not deal with symlinks properly. Needs more investigation.
The text was updated successfully, but these errors were encountered: