2

Since early Mac versions, I have been able to rearrange the icons on my desktop. Until I use one of the "Cleanup" options, they can be in pretty much random positions, even overlapping each other. The same layout of of file, directory, and app icons appears on all Desktop/Workspaces.

Where is that information on icon position stored?

What I would like to try doing is having the Desktop folder actually be a symlink that can be set to point to folders Desktop1, Desktop2, etc. I want to use the Current Key app (free) and it's use of AppleScript functions (https://currentkey.com/room-change-alerts/) to change that symlink on the fly, whenever I change desktops, so that I get a different set of icons for each desktop space that I'm in.

I would also like to preserve the layout of each set of desktop icons by also swapping the layout file.

Where can I find that layout file? (If it's a hiddent file in the Desktop directory then I might be home free.)

Thanks.

2
  • See also apple.stackexchange.com/questions/420090/…
    – lhf
    Commented Aug 27, 2021 at 12:02
  • 1
    You may find it helpful to lock the symlinked Desktop folder as per this answer, to prevent it being reverted to a standard Desktop folder on reboot/login. I don't know how that would affect your plans with the Current Key app. Commented Mar 16 at 23:56

1 Answer 1

3

Mac OS X/macOS stores Finder layout information (including desktop icon placement) within the .DS_Store file that's located inside the current directory.

10
  • Thanks, @AT0mic. That means it gets copied along with the rest of the Desktop folder. That's what I was hoping and didn't know where to look. ---- However, I was mistaken that I'm now "home free" because it turns out that the only way to get the desktop to refresh is to restart the Finder and that is not a speedy process, it has to rebuild every open Finder window too.
    – August
    Commented Jan 10, 2021 at 1:14
  • That restarting Finder problem has been solved by Clarity shirt-ediss.me/clarity. Clarity works by moving everything out of the Desktop folder rather than replacing the whole folder, so restarting Finder is not needed. That means it gets a new set of icons (none, or restoring the original set, or whatever) fairly quickly. (apple.stackexchange.com/questions/406287/…)
    – August
    Commented Jan 17, 2022 at 8:32
  • 1
    @jsx97 I found different behaviour with my ~/Desktop folder. Testing only icon positions, .DS_Store updated with every icon position change. However, when I tried the same in ~/test the .DS_Store file updated only after making changes and quitting the Finder. Commented Mar 16 at 23:43
  • 1
    My Desktop is synced to iCloud which might explain the different behaviour. There's much more information in this article and its comment thread Commented Mar 16 at 23:46
  • 1
    So given that .DS_Store files do store icon positions for folders but for "normal" folders they aren't updated until the user quits the Finder, clearly that information is cached somewhere until the files get updated. Hopefully that answers your question @jsx97 ? Commented Mar 18 at 12:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .