Open z3t0 opened 7 years ago
I've done very little with the spoons, so I defer to others, but for what it's worth, here's my two cents:
I agree with points 1 and 2 whole heartedly and would add that if you're replacing an existing spoon (i.e. upgrading it to a newer version) you should be prompted to confirm this as well (I haven't used the spoon feature in a while, so if this already happens then disregard)
As to 3... while I agree that it shouldn't be deleted when you do this, the whole point of it being a bundle is that it is just that... a bundle that the finder treats as a single unit even though it's really just a folder with specific contents. In this case I would think that Hammerspoon should just silently ignore the action of double clicking on it. @cmsj?
I think a simple check here for whether the spoon is in the spoons directory would be perfect.
I agree with point 1.
Point 2 I'm a little less sure about - my intention here was to copy the way that Safari installs extensions, which it does by moving the bundle. The behaviour I had in mind was someone downloading a .zip of a Spoon with a browser, which would put it in ~/Downloads/ and unzip it, they open the spoon and Hammerspoon ingests it and tidies up their Downloads folder.
For point 3 we can just special case the spoons path and ignore open requests for that.
Point 2 I'm a little less sure about - my intention here was to copy the way that Safari installs extensions, which it does by moving the bundle. The behaviour I had in mind was someone downloading a .zip of a Spoon with a browser, which would put it in ~/Downloads/ and unzip it, they open the spoon and Hammerspoon ingests it and tidies up their Downloads folder.
Yeah that makes sense. It was just a quirk that I found annoying when developing a Spoon. For example I like navigating in the terminal and occasionally using open .
to launch a finder. Now whenever I would accidentally do this while inside the project it would try to install the spoon but then delete it or something and then it would be nowhere ....
I think just to be on the safe side it would be nice to be prompted whether or not we want it to be deleted. However, with the changes you have suggested above it's not a big deal.
There are a few things with the way spoons are installed that make it somewhat dangerous. Here are my recommendations
What do you think?