try this in Terminal
mkdir ${TMPDIR}/com.apple.IconServices
This recreates the com.apple.IconServices directory, which apparently gets itself deleted from time to time.
I search a lot in com.apple.finder.plist
file (under the folder ~/Library/Preferences
) to found the answer but I can't.
I think the best option to do what you want is to create an AppleScript and use it as a service with automator.
I know that is not what you want, but it's a solution to change window's size for the active window with a shortcut.
We will use the Applescript below (more about this Applescript here)
on run
tell application "Finder"
activate
set bounds of front window to {0, 100, 490, 248}
end tell
end run
How to create the Service with Automator
Open Automator and Select Service
![enter image description here](https://i.stack.imgur.com/gPsVB.jpg)
Search for AppleScript
and double click on Run AppleScript
In Service Receives
set to no input
in any application
Copy the Script below and paste it in Automator
![enter image description here](https://i.stack.imgur.com/VfWPM.jpg)
Don't forget to save your service (cmd+s)
![enter image description here](https://i.stack.imgur.com/u9iG9.jpg)
Assign a shortcut for your service
- Go to System Preferences / Keyboard / Shortcuts
- From the left sidebar select Services
- Find your service and add a shortcut (e.x. cmd+shift+w)
![enter image description here](https://i.stack.imgur.com/6FN3F.jpg)
Now open your folder, press cmd+shift+w
and the window's bounds will be change to {0, 100, 490, 248}
More Informations about BoundsProperty, to create your own here
Update:
Here's the AppleScript to choose your own width and height for the window without changing the destination from the side of the screen. Just change myWindowWidth
and myWindowHeight
. Also I have some other variables in comment to understand the code. Please reply if you have any question!
on run
tell application "Finder"
activate
--we take the bounds properties of the front window
set windowAreaDimensions to bounds of the front window
set x1 to item 1 of windowAreaDimensions
set y1 to item 2 of windowAreaDimensions
set x2 to item 3 of windowAreaDimensions
set y2 to item 4 of windowAreaDimensions
set destToLeft to x1
set destToTop to y1
--set destToRight to x2
--set destToBottom to y2
--set previousWindowWidth to destToRight - destToLeft
--set peviousWindowHeight to destToBottom - destToTop
set myWindowWidth to 730
set myWindowHeight to 521
set sameWidth to destToLeft + myWindowWidth
set sameHeight to destToTop + myWindowHeight
--The following line script return the bounds of the front window
--get the bounds of the front window
--The following line set our bounds for the front window
set bounds of front window to {destToLeft, destToTop, sameWidth, sameHeight}
end tell
end run
Best Answer
I found the answer here. In summary:
com.apple.finder.plist
in~/Library/Preferences
(Check here if you don't know how to edit this file)scrollPositionY
(orscrollPositionX
) set to 0. (Note, there are other setting where the scroll position pops up so it depends a little bit where you experience the problem)