Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding buttons to Finder toolbar?

Tags:

Dropbox has the option of adding a button to the Finder toolbar. It even appears in the 'Customize Toolbar...' window.   I can't find any documentation on how this sort of thing is done.... Does anyone know how to do this, or can anyone point me towards some documentation or sample code?

EDIT ONE:

I guess a start would be finding the location of the existing icons, and any related code.

I noticed that Dropbox has files in Library/DropboxHelperTools/Dropbox_u501 called mach_inject_bundle_stub.bundle and FinderLoadBundle which might be doing the magic. Dropbox is also putting the 'tick' badge on Finder icons. This code might be involved: github.com/rentzsch/mach_star

EDIT TWO: A Dropbox talk by Rian Hunter about the process is here, at around 15:30 http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-how-dropbox-did-it-and-how-python-helped-4896698

Looking in the DropboxBundle file in the Dropbox_u501 shows the icons and some compiled code. The code suggests that Rian Hunter is the author: http://twitter.com/timeserena

Rian has his own version of the Mach Star code on his github - https://github.com/rianhunter/mach_star - tho it seems much older

EDIT THREE

There was a 'Code Injection Workshop' at Stanford a few weeks ago - http://stanfordacm.com/past/ - hosted by Rian. If anyone has notes from this please let me know!

like image 372
cannyboy Avatar asked Dec 05 '11 02:12

cannyboy


People also ask

How do I add icons to my Mac toolbar?

Hold down the Command (⌘) key. Hover your mouse cursor over the icon you want to move. Holding down the left mouse button, drag the icon into your preferred position on the menu bar.

How do I add items to my Mac Finder Sidebar?

In the Finder menu bar, select Go and choose Applications in the menu. Locate the application you want to add to the sidebar, press and hold the Command key, and drag the application to the Favorites section of the Finder sidebar.

How do I add a home button to Finder on Mac?

In the Finder go to the Go menu, select Go to Folder. In the dialog that comes up put /Users (the slash is important) and click the Go button. You should see a new Finder window with several icons in it including your house. Drag that house icon into the Dock.


1 Answers

You can use Finder Sync app extension(Starting in OS X v10.10).

A Finder Sync extension can:

  • Add, remove, and update badges and labels on items in a monitored folder.
  • Display a contextual menu when the user Control-clicks an item inside a monitored folder.
  • Add a custom button to the Finder’s toolbar.
like image 142
Parag Bafna Avatar answered Sep 29 '22 01:09

Parag Bafna