It seems that there are two ways to arrange Mac desktop icons. One is that Icons can be placed randomly (1), and the other is that Icons can only be placed in invisible grids on the desktop (2)
In the first State (which is also the default state of Mac), right-click the blank area of the desktop and select "organize"
The icon is automatically adjusted to the nearest grid position, but there is usually a gap between the desktop icons
If you do not want to leave the icons blank, you can switch to the second arrangement (keep them in neat mode)
Right-click the blank area on the desktop, and the menu is displayed. Press the option key. The original menu "arrangement" is changed to "keep neat"
Select a sub-menu as needed, such as "name"
At this time, the desktop icons are rearranged, and no space is available, and the icon arrangement mode is changed, and the icon cannot be changed at will.
The desktop icon is automatically arranged in the second State.
The same way to switch back,
This technique also applies to the Finder.
This is also an option key skill. It will surprise you to press the option key in many menu areas.
Refer
Tips for Apple Mac OS X Per day 003: a few tips for using the option (alt) Key