This project contains scripts that once installed, make the macOS Finder remember every folder's size and position on the screen and restores it when you revisit said folder. Only folders inside the Documents folder are affected.
This is inspired by the following article: https://arstechnica.com/gadgets/2003/04/finder/ .
Tip: hide the Finder sidebar (^ ⌘ S) and toolbar (⌥ ⌘ T) to have every folder open in its own window.
demo.webm
yabai (required disabling SIP).
If you don't have yabai or don't want to (or can't) turn of SIP, you could achieve similar behaviour by hiding the Finder sidebar (^ ⌘ S) and toolbar (⌥ ⌘ T).
Link all 3 scripts to a place in the path and execute install.sh to install the yabai rules.
For example:
sudo ln -s /Users/...full-path-here.../spatialfinder_loadstate.sh /usr/local/bin/
To only restore the size but not the position (or vice versa), comment out the relevant parts at the bottom of the loading script.
Every time a Finder window is resized or moved, its new size and position are stored in a hidden .framedata.json file in that folder. When a folder is opened, this file is used to restore its state.
When two folders of the same name exist, the state is not saved nor is it restored. This is a design limitation.