Save personalisation in a bash script via gsettings - running into issues

I would like to put my post-install configuration such as selecting the Layout in a bash script, to easily return to my personalised desktop after a clean install (and share my personalisation with others).

To gather the commands, for example to change layouts I do this:

  1. Open the app (like Layouts)
  2. Run dconf watch / in Terminal
  3. Then in Layouts switch from “Manjaro” layout to “Unity”

dconf watch / does not work for everything, for example Dash to Panel Settings. How can I capture those commands while making changes in the Dash to Panel Settings window?

For the Layout: The output I have to modify slightly (add the command, change / to dots etc), remove the doubles, this is the result, I save it to a file

gsettings set dock-position 'LEFT'

gsettings set extend-height true

gsettings set dock-fixed true

gsettings set menu-layout 'Unity'

gsettings set remove-menu-arrow true

gsettings set arc-menu-placement 'DASH'

gsettings set menu-button-icon 'Distro_Icon'

gsettings set distro-icon 3

gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

gsettings set window-buttons-theme 'default'

gsettings set disabled-extensions "['']"

gsettings set org.gnome.mutter overlay-key 'Super_L'

gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Alt>F1']"

gsettings set available-placement "[false, false, true]"

gsettings set enabled-extensions "['', '', '', '', '', '', '', '']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super><Alt>Down', '<Control><Alt>Down', '<Super>s']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['<Super><Alt><Shift>Down', '<Control><Alt><Shift>Down', '<Super><Shift>s']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['<Super><Alt><Shift>Up', '<Control><Alt><Shift>Up', '<Super><Shift>w']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Super><Alt>Up', '<Control><Alt>Up', '<Super>w']"

gsettings set disable-user-extensions false

gsettings set pinned-app-list "['Firefox', '', 'firefox.desktop', 'Terminal', '', 'org.gnome.Terminal.desktop', 'ArcMenu Settings', 'ArcMenu_ArcMenuIcon', 'gnome-extensions prefs']"

gsettings set unity-pinned-app-list "['Home', 'ArcMenu_Home', 'ArcMenu_Home', 'Documents', 'ArcMenu_Documents', 'ArcMenu_Documents', 'Downloads', 'ArcMenu_Downloads', 'ArcMenu_Downloads', 'Software', 'system-software-install-symbolic', 'org.manjaro.pamac.manager.desktop', 'Files', 'system-file-manager', 'org.gnome.Nautilus.desktop', 'Log Out', 'application-exit-symbolic', 'ArcMenu_LogOut', 'Lock', 'changes-prevent-symbolic', 'ArcMenu_Lock', 'Power Off', 'system-shutdown-symbolic', 'ArcMenu_PowerOff']"

This works: I switch back to Manjaro, log off/log on, run the above script. I can log off/on again to be sure.

Issue: Even though I am using Layout “Unity”, the Layout app still has Manjaro selected.
How come? What can I do more to ensure the Layout app shows the actual currently running layout?