Saturday, February 9, 2008

Add Drawer to Stacks (Tweak series)


This one is my favorite tweak so far, 

it adds a drawer icon to a stack, 
it is very simple yet not well crafted solution in my opinion.


It is a set of beautiful icons that wrapped as classic applications,
you copy the application to the appropriate stack and this way the application icon will appear in the stack on the dock, since it has a half icon then other icons will appear behind it, 

every stack has its appropriate icon (downloads, application, documents, etc.)
in order to make the drawer icon appear first (in front of all other icons) all the time, no matter how you arrange the stack, we use two tricks:

1. the first is to change the icon name to start with space, this way if we sort by name it will always appear first (assuming you don't use space or symbols as file name starter)
2. the second trick is to change the date of the file to somewhere in the far future (the year 2020 will do :-)) so even if we order the stack using added date or change date it will still appear first so we will see it in the front of the 3d stack icon.

one exception: if you have alias (A.K.A shortcut in windows) in the stack folder and you sort by type, then it will be first (and not the drawer icon).

so in order to install the drawer icon this is what you do:
1. download the attached icons DMG files
2. mount them and choose the one you like best to represent your stack
3. open the stack folder (right click on the stack for instance Downloads and choose open "Downloads")
4. copy the desired icon from the DMG file to the opened stack folder (for instance into Downloads)

these next step should be taken only if the drawer do not appear at all!!
5. change the icon name to whatever you like but make sure it starts and ends with space
6. open terminal and change into the directory using CD command
7. change the file date using this command:
   touch -mt 202001010101.01 \ Download\ .app
note: the \ sign is there in order to escape the space characters for the terminal
8. if the drawer appears as a white no-entry sign, write this line in the terminal:
   killall Dock

thats it, here is mine looks:


b.t.w note that my "Recent Document" stack and "Recent Applications" stack cannot have drawer since this is a "virtual" folder and not a real one.

earlier i said that it is not well crafted, since the icon app always have to stay in the folder (what if it is deleted by mistake?), also it will always appear in the stack fan or stack grid as the first object (not so nice),

i tried tweaking the Dock application at: /System/CoreServices/Dock.app but all i succeeded is changing the resources png file of the minimize icon to a drawer, apple didn't supply any layer icon for all the stacked icons, also even if there was one it would be the same one for all the stack, i also tried tweaking the dock property xml just another dead end, so this is the best solution there is.

attached files:

b.t.w. the icons comes from some Japanese blog named: "optica-optima"
and there is an application that does that for you called "Stacks in Da Place"
Enjoy.

No comments:

 
the menu is from: Milonic DHTML menus