Thanks. This will only reset and window size and position for System Settings and nothing else like settings/preferences or anything?Yes, close System Settings, from Terminal run
You might have to grant Terminal temporary Full Disk Access.Code:defaults delete ~/Library/Preferences/com.apple.systempreferences.plist "NSWindow Frame main"
Yes, only the size and position of System Settings.Thanks. This will only reset and window size and position for System Settings and nothing else like settings/preferences or anything?
Thanks. I did it before reading your last post. It worked. Didn't make a copy of the file but it is still there and now has different parameters for the window size and position.Yes, only the size and position of System Settings.
Just in case, make a copy of the file ~/Library/Preferences/com.apple.systempreferences.plist
Yes:Is there a Terminal command to reset the Mac App Store's window size and position?
defaults delete ~/Library/Preferences/com.apple.AppStore.plist "NSWindow Frame AppStoreMainWindow"
No. Just close the app, run the command, open the app and the position should be reset to the default location.Is it necessary to restart your Mac or anything after running these Terminal commands?
Is there a way for me to find out the Terminal command for resetting various app window sizes and positions myself?No. Just close the app, run the command, open the app and the position should be reset to the default location.
I assume resetting the window size and position is possible for third-party apps as well? Or do such Terminal commands only work for macOS native apps?Usually, window size and position values are saved in the application’s preference file. You have to identify the preference file of the app and delete the key that stores the values, most likely to start with NSWindow.
Rather than from Terminal, it’s probably easier to use a free app like Prefs Editor https://apps.tempel.org/PrefsEditor/
/usr/libexec/PlistBuddy -c "Delete :ComputerViewSettings:WindowState:WindowBounds" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :TrashViewSettings:WindowState:WindowBounds" ~/Library/Preferences/com.apple.finder.plist
killall Finder
/usr/libexec/PlistBuddy -x -c "Print :ComputerViewSettings:WindowState:WindowBounds" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -x -c "Print :TrashViewSettings:WindowState:WindowBounds" ~/Library/Preferences/com.apple.finder.plist
To reset the Sidebar width to the default value:the corresponding Terminal command to reset the default width of the Finder Sidebar.
defaults delete ~/Library/Preferences/com.apple.finder.plist SidebarWidth