4Source / settings-profiles-obsidian-plugin

This is a plugin for Obsidian (https://obsidian.md). Allows you to create various global settings profiles. You can sync them between different vaults. To keep all your settings in sync, you'll never have to manually adjust them again for every vault you have or create in the future.
https://forum.obsidian.md/t/settings-profiles-plugin-release/76657
MIT License
32 stars 1 forks source link

[FEAT]: Sync (some) settings between Obsidian configuration folders in the same vault #50

Open FeralFlora opened 1 month ago

FeralFlora commented 1 month ago

Description of the unfavorable solution

One vault can have multiple configuration folders, if you override the default config folder. This is useful, if you need a different setup on your mobile device, for example. However, there's still things like CSS snippets, certain plugins, settings and hotkeys that you want in both configs. It can be tedious to keep two config folders partially in sync.

I've been using FreeFileSync to do this, but it is still quite a bit of work.

Describe the feature you would like to have

Since this plugin can already sync settings etc. between vaults, it seems like it shouldn't be too difficult to do the same between vault configs. This would make the task of keeping configs partially in sync a lot easier.

Additional context

  1. I don't know how the plugin currently handles conflicts, but I suppose some form of conflict resolution would be required. Otherwise, it should be possible to specify which config folder should override the other(s).

  2. Since one of the main reasons for making multiple configs is to have certain things differ on different devices, this FR requires more granularity in setting profiles, like the ability to select which specific plugins to sync between configs.

image

4Source commented 1 month ago

2. Since one of the main reasons for making multiple configs is to have certain things differ on different devices, this FR requires more granularity in setting profiles, like the ability to select which specific plugins to sync between configs.

I am currently working on this

Maybe it would be a better solution to allow something like synchronize specific settings between different profiles. In this case the settings of connected profile would be synchronized between them and no more multiple config folders will be required. What do you think about this solution?

FeralFlora commented 1 month ago

At the moment there are some problems with synchronized vault to different devices.

My request is not about syncing to different devices, but different configuration folders within the same vault.

In this case the settings of connected profile would be synchronized between them and no more multiple config folders will be required. What do you think about this solution?

Hmm, I am not sure. It sounds a bit finicky for the plugin to be switching setting profiles, depending on which device you are on, rather than handling it the native way with configuration folders.

4Source commented 1 month ago

My request is not about syncing to different devices, but different configuration folders within the same vault.

I just mention it because I thought you use one of your vaults with multiple devices and this could cause problems.

Hmm, I am not sure. It sounds a bit finicky for the plugin to be switching setting profiles, depending on which device you are on, rather than handling it the native way with configuration folders.

Which profile is selected is planned to be stored on the device so you only have to select the profile once on each device.

FeralFlora commented 1 month ago

Which profile is selected is planned to be stored on the device so you only have to select the profile once on each device.

Yeah, but wouldn't that mean that the same plugins are installed in the configuration on both devices? I suppose the difference would be which ones are enabled on each device?

4Source commented 1 month ago

Yeah, but wouldn't that mean that the same plugins are installed in the configuration on both devices? I suppose the difference would be which ones are enabled on each device?

The installed plugins is your problem? Because of not all plugins support mobile devices and this causes issues when there are installed?

This is a design decision. I would prefer if the plugins get removed when there not in profile this would be much cleaner in the plugins tab. But currently there don't get removed for simplicity.

4Source commented 1 month ago

If I understood you correct you now have one vault hat get synced (by some external software) between different devices and for each device you have a different configuration (separate config folder).

What is about the same as having for each devices separate profile with the configs for this device. The current problem is that the active profile is saved in plugin settings and not per device. But this is no problem this could be easily implemented.


In your request you asked for synchronization between selected settings between the different device configuration folders. So some settings are the same in all folders.

This could be done with the profiles too. I thought about "sync groups" it will let you create a new group and select what options of the settings should be synced. Than you can add profiles to this group if a profile is in a group changes for the specified options will also apply to the other profiles in this group. So it could be easily checkt a profile is in multiple groups an have conflicts with specified options.


This would fit great in the existing functionalities. And if I don't miss anything this would fit your needs.

FeralFlora commented 1 month ago

In your request you asked for synchronization between selected settings between the different device configuration folders. So some settings are the same in all folders.

Yes, exactly.

I thought about "sync groups" it will let you create a new group and select what options of the settings should be synced. Than you can add profiles to this group if a profile is in a group changes for the specified options will also apply to the other profiles in this group.

This sounds good. However, with one configuration folder, does this mean that the vault changes depending on the device you are on? Like when I open the vault on a mobile device, will some plugins be removed from .obsidian, and then added back when I open the vault on another device with a different setting profile?

4Source commented 1 month ago

This sounds good. However, with one configuration folder, does this mean that the vault changes depending on the device you are on? Like when I open the vault on a mobile device, will some plugins be removed from .obsidian, and then added back when I open the vault on another device with a different setting profile?

Not the complete vault changes just the content of the .obsidian folder. If you open on another device with different profile selected the settings of this profile get loaded in .obsidian.