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
45 stars 1 forks source link

[FEAT]: Sync only one of the components of a profile #60

Open 1ku1 opened 1 week ago

1ku1 commented 1 week ago

Description of the unfavorable solution

I changed hotkeys, so I want to trigger the sync of hotkey component of the used profile (without having to create a different profile and manage switching between the two).

Describe the feature you would like to have

May be a save/reload button in the profile options page or through a subcommand(?)

Additional context

No response

4Source commented 1 week ago

@1ku1 I created a beta release containing some new command could you try it.

0.5.10-beta.1

You could install it via a plugin of mine VARE or add the release files manually

I am waiting for your feedback hop this fit your needs

1ku1 commented 1 week ago

@4Source

Thanks. I tried it. It seems to work correctly and I have two notes:

  1. There is no reload partially. For example, only import hotkeys.
  2. There isn't an easy way to set a profile as default without applying it (reloading from it).
    • Create a test Vault1, Vault2, make changes to Vault2 only
    • Create settings profile Test.
    • Set Test as default for Vault1 , save to it.
    • Set it as default for Vault2. Now your changes in Vault2 are overridden because the profile has to be reloaded.
4Source commented 1 week ago
  1. There is no reload partially. For example, only import hotkeys.

Had this but not function properly this requires some struktural changes I try to add it.

There isn't an easy way to set a profile as default without applying it (reloading from it).

  • Create a test Vault1, Vault2, make changes to Vault2 only
  • Create settings profile Test.
  • Set Test as default for Vault1 , save to it.
  • Set it as default for Vault2. Now your changes in Vault2 are overridden because the profile has to be reloaded.

What your are calling default is the selection of the profile. I think this is the expected behavior your are switching to a profile this means you would like to have the settings in this profile to be loaded. What are you trying to achieve may there is a solution to this

4Source commented 1 week ago

I created a new beta release 0.5.10-beta.2 with the Load partially command and a command that allows to save the current settings to a specified profile

1ku1 commented 6 days ago

@4Source I have tried beta 2. Things seem to work correctly

What your are calling default is the selection of the profile. I think this is the expected behavior your are switching to a profile this means you would like to have the settings in this profile to be loaded.

Not necessarily. see below

What are you trying to achieve may there is a solution to this

For example, if you want to export only the hotkeys of Vault 2, you won't be able to run the command save current profile partially because hotkeys will be overwritten by setting the profile as default.

4Source commented 6 days ago

If I understand you correctly you would like to save the current hotkey settings to a not selected profile.

This is possible with Save to profile partially there you could select the target profile and the settings you would like to save

1ku1 commented 6 days ago

This is possible with Save to profile partially there you could select the target profile and the settings you would like to save

You are right, but in short, I have to be careful whenever I install and configure settings-profiles to a new vault so as not to overwrite the profile. I want to be able to set it as default one to read from/write to for this new vault then calmly examine which settings I want to import and export.

When setting up the new vault, overwriting everything default/local is kinda scary 😅

4Source commented 6 days ago

Ok I think your are using the plugin completely different than I do.

To clarify:

1ku1 commented 6 days ago

You would like to be be able to switch to a profile in a new vault (or any other) without loading the settings from the profile in the vault?

Yes, please.

Note: I can add this but I don't understand what your scared of by loading setting in an empty vault 😅

  1. It is not empty, since I usually copy over the .obsidian file of the vault with the closest use case to quickly "install the plugins" and have the settings closest to what I need. I then review and move from there.
  2. On the other hand, even when I create an empty vault, I don't like to overwrite the defaults without review first.

You would like to have a message before changes are saved to a profile?

I think that would be helpful. You can always add a checkbox "Don't ask again".

4Source commented 6 days ago
  1. It is not empty, since I usually copy over the .obsidian file of the vault with the closest use case to quickly "install the plugins" and have the settings closest to what I need. I then review and move from there.

Why you don't let this do this plugin you just need to install this one and than you can just install them by selecting profile

Ok I will work on this

1ku1 commented 6 days ago

Why you don't let this do this plugin you just need to install this one and than you can just install them by selecting profile

I plan to. Once I can tell it which settings and plugins to ignore :D

Ok I will work on this

Thanks a lot

4Source commented 5 days ago

image

The profile switcher now allows to switch without loading

0.5.10-beta.3

4Source commented 3 days ago

Could you test the new Commands, are there working? I will also do more testing and the I will merge it.

1ku1 commented 3 days ago

I tried it and the new command is working (to the extent of my testing). I have a small suggestion: to have the same option in the settings page: in a new clean vault > settings-profile settings page > when you click switch to profile: maybe show a small drop down menu with:

Thanks