opened
sloria
username_0
<!-- NOTE: ignoring this template will lead to your issue being dealt with more slowly -->

**Describe your feature request**

I would like to sync my preferences across multiple machines. Currently, I have to manually configure both my work and personal laptops to match.

**Additional context**

I'm currently using a Dropbox folder as my storage location. It would be convenient if the preferences could live in the same folder, so everything's in one place. nvalt, for example, saves a `Notes & Settings` file in the storage folder.
Preferences syncing
issue
created
gingerbeardman
username_1
How about storing your pref in Dropbox and then symlink to it from the pref folder of each macOS.

I've not tried this, but it should work.
comment
created
sloria
username_0
That should work but it requires manual action outside of FSNotes, which isn't ideal. Also, non-technical users would not likely be comfortable doing that. It'd be great if this were a part of the application.
comment
created
sloria
username_0
Unfortunately, symlinking didn't work. I ended up with a weird state with two storage locations after opening FSNotes on my 2nd machine:


![Image 2020-05-11 at 10 17 21 AM](https://user-images.githubusercontent.com/2379650/81572694-84fd4600-9371-11ea-85af-2bc79a05cb77.png)

I had to remove the symlink to revert back to the normal state.
comment
created
gingerbeardman
username_1
Well, if only one person is asking for a feature then a simple workaround outside of the app is a good place to start. 

How did you do the symlink on each Mac?
comment
created
sloria
username_0
```sh
#/usr/bin/env bash


SETTINGS_PATH="$HOME/Library/Containers/co.fluder.FSNotes/Data/Library/Preferences/co.fluder.FSNotes.plist"

if [ ! -L "$SETTINGS_PATH" ]; then
  echo "==> Backing up preferences..."
  mv "$SETTINGS_PATH" "$SETTINGS_PATH.bak"
fi

ln -sf "$PWD/co.fluder.FSNotes.plist" "$SETTINGS_PATH"
echo "==> Done."
```
comment
created
gingerbeardman
username_1
OK, do not us `-s` for symbolic link. I did that and saw it not working as you describe.

This worked for me: 
`ln ~/Dropbox/co.fluder.FSNotes.plist ~/Library/Containers/co.fluder.FSNotes/Data/Library/Preferencesco.fluder.FSNotes.plist`
comment
created
sloria
username_0
I'll try that later today and report back
comment
created
sloria
username_0
Unfortunately hardlinking with `ln DROPBOX_PATH PREFERENCES_PATH` didn't work either.
comment
created
gingerbeardman
username_1
Can't you expand on what exactly went wrong?
comment
created
sloria
username_0
Yes, those are the steps I followed. I used 

```sh
ln "$PWD/co.fluder.FSNotes.plist" "$HOME/Library/Containers/co.fluder.FSNotes/Data/Library/Preferences/co.fluder.FSNotes.plist"
``` 

to make the link. When I made the link on my second machine, my settings were not updated.
comment
created
sloria
username_0
FWIW, if https://github.com/glushchenko/fsnotes/pull/890 and https://github.com/glushchenko/fsnotes/pull/889 are merged and a "Reset to Defaults" button is added as [suggested here](https://github.com/glushchenko/fsnotes/issues/887#issuecomment-627093795), this issue will be less important to me since I'll mostly just use the defaults. We could even close this if there's no interest in implementing it.
comment
created
gingerbeardman
username_1
this makes no sense to me, as this is outside of FSNotes control
comment
created
sloria
username_0
I'm puzzled, too. Are _all_ settings stored in `co.fluder.FSNotes.plist`? In particular, I noticed that my line spacing and line width settings were not getting updated.
comment
created
gingerbeardman
username_1
So another app has tracked down the issue: `.atomic` writing

https://github.com/knurling/ServiceStation/issues/34

so, perhaps we can remove that in FSN @glushchenko ?

then hard links (`ln`) would work for syncing prefs.
comment