This is an example of a script for new systems, which 'mounts' dotfiles from a cloud-synced directory, and also moves junk out of the homedir into the places where it "should" live as per various filesystem standards (Linux FHS, FreeDesktop.org, macOS, etc.), replacing the origins with symlinks to the new locations.
The script is designed to be idempotent; it could theoretically be run on startup.
Various locations are hard-coded. Please take this script only as inspiration; don't try to run it directly.