settings-profiles-obsidian-plugin icon indicating copy to clipboard operation
settings-profiles-obsidian-plugin copied to clipboard

[FEAT]: Include/exclude certain plugins

Open 1ku1 opened this issue 1 year ago • 19 comments

Description of the unfavorable solution

I am always frustrated when the following happens:

  • I sync my plugins between vaults through your awesome plugin
  • I add a particular plugin with a UX tax to a specific vault that needs it
  • settings-profiles syncs the entire plugin folder to all other vaults, burdening them with that UX tax.

Either I disable all plugin sync and keep copying them manually, or I enable it and be annoyed when that particular plugin pops up!

Describe the feature you would like to have

An include/exclude list for plugins

In my case, I want all plugins (including new ones) to be synced automatically except that particular one. SO, I will use the exclude mode.

Other users may want to sync only a handful of preselected plugins, so they would use the include mode

Thanks in advance

Additional context

No response

1ku1 avatar Sep 04 '24 15:09 1ku1

Thanks for your request, I am currently unhappy how the plugin sync behave by myself. How do you think about that only the enabled plugins get synchronized?

4Source avatar Sep 04 '24 16:09 4Source

Thanks for your request, I am currently unhappy how the plugin sync behave by myself. How do you think about that only the enabled plugins get synchronized?

That could work...partially. It will solve my problem above but won't allow you to keep different plugin settings in different vaults.

1ku1 avatar Sep 04 '24 16:09 1ku1

I will test some things and inform you if I got a different solution

4Source avatar Sep 04 '24 17:09 4Source

The more I think about it, the clearer it is in my mind that something should happen that will solve this (plugins), #59 (appearance), #58 (safe automatic sync), and maybe other issues : restructure the plugin to copy and insert JSON data rather than files. But instead of keeping track of all the data used (which should be unmaintainable), allow the user to have a per-vault setting to manually specify JSON keys NOT to take/sync. Like gitignore. This should be easier as it shifts the effort to the user.

When restoring/reloading, the plugin inserts all those (previously filtered) keys, but since the receiving vault also has its own blacklist, it won't overwrite those keys.

For an example , I would enter something like in vault 1 (forgive my ignorance of the proper syntax):

settings-profiles.profileUpdateDelay appearance.textFontFamily annoying-plugin.data second-annoying-plugin.*

in that blacklist ("Don't copy those settings)" and Settings Profile would strip those from JSON data and copy the rest.

In vault 2, it has a receive (reloading) blacklist ("Don't overwrite those settings"):

appearance.theme

So no theme change.

In vault 3, there is no blacklist, so the theme will be updated, along with the other settings.

I hope I made myself clear! Thanks

1ku1 avatar Sep 04 '24 21:09 1ku1

I like the Idea to allow a vault specific ignore file. But I think this should only be for advanced usage and may create a form in the future so it could be clicked together to give all users easy access.

But I would like to keep the normal usage editable from the UI. Also is it planned to stop using a profile path where all the profiles live.

Also like the format

settings-profiles.profileUpdateDelay appearance.textFontFamily annoying-plugin.data second-annoying-plugin.*

4Source avatar Sep 05 '24 10:09 4Source

@4Source I am glad you like it. I agree about hiding it from the average user. Once the syntax is decided, I believe I am comfortable editing it in a text file directly.

1ku1 avatar Sep 06 '24 11:09 1ku1

Fixes #59

4Source avatar Sep 10 '24 17:09 4Source

I did a little research it seem like the . is not a good idea to use as separator because it seems to be allowed in the id of the plugin. I think a good replacement would be > I think this is not allowed in plugin id because it is in windows not allowed in file/path names and the plugin id is normally the folder name of the plugin

settings-profiles>profileUpdateDelay
appearance>textFontFamily
annoying-plugin
second-annoying-plugin>*
*>debug

4Source avatar Sep 12 '24 19:09 4Source

Thanks for working on this 👍

Will there be a way to make sure you entered the ignored setting correctly?

1ku1 avatar Sep 13 '24 03:09 1ku1

A good point like vscode fades the files in gitignore to grey so you have a visual feedback. I will think about how to solve this properly.

4Source avatar Sep 13 '24 07:09 4Source

I'm looking forward to update on this as well.

craziedde avatar Apr 27 '25 12:04 craziedde

+1 on this feature. Right now I am using this plugin to toggle a few settings between Personal and Work in one vault (one-life-one-vault gang).

I am also syncing my .obsidian folder with git to use cross-devices. Because of this, I save profiles in .obsidian/profiles so other devices can access both profiles.

Since this file mandates that either all or none of the comunity and core plugins are synced, git now tracks many repeat files, and shows a diff every time i switch profiles.

So if I was able to ignore, then it would reduce this duplicate nature.

Side note: it would be awesome if there were device-specific default profiles, and if a profile had an option to be automatically pulled-from on startup.

Love the plugin btw!

karlfrohlich avatar Jul 02 '25 07:07 karlfrohlich

Thanks for your feedback and insides this helps me a lot. If I finally manage to find some time, I would like to do a mayor rework which should help to close a lot of the open issues.

4Source avatar Jul 02 '25 08:07 4Source

You're very welcome. In case it helps any further, the specific settings which I want to swap between Work vs Personal are:

  1. Attachment folder path (Attachments/Work vs Attachments/Personal)
  2. Excalidraw folder path (Excalidraw/Work vs Excalidraw/Personal)
  3. Daily Note: New file location (Personal/Daily Notes vs Work/Daily Notes)
  4. Graph filters (show only personal nodes vs work nodes)
  5. Synced Calendars in Time Ruler plugin (personal calendars for personal profile, work calendars for work profile)

Note: any time I say Work, what I really mean is Work/Company_Name, since I plan to keep notes separated depending on the company I'm working for.

karlfrohlich avatar Jul 02 '25 20:07 karlfrohlich

I think all of these are just some setting and because I am planning to make every setting configurable this would be definitely included

4Source avatar Jul 02 '25 20:07 4Source

I think all of these are just some setting and because I am planning to make every setting configurable this would be definitely included

Makes sense. Just wanted to paint you a clearer picture is all.

karlfrohlich avatar Jul 02 '25 21:07 karlfrohlich

Good morning,

Slightly off-topic question

[WORK-AROUND][IDEA] Is it possible to somehow manually rename plugin in secondary vault to stop the sync for selected plugins?

craziedde avatar Nov 16 '25 13:11 craziedde

Is it possible to somehow manually rename plugin in secondary vault to stop the sync for selected plugins?

I think this could potentially cause issues. The plugin id (manifest.json) is used to identify the plugin this should match the folder name. If you change both it possible gets correctly linked together but I am pretty sure you will get problems with updating the plugin because the same id is used to find the URL in the plugin file where you obviously can't change the id

4Source avatar Nov 16 '25 13:11 4Source

I think this could potentially cause issues. The plugin id (manifest.json) is used to identify the plugin this should match the folder name. If you change both it possible gets correctly linked together but I am pretty sure you will get problems with updating the plugin because the same id is used to find the URL in the plugin file where you obviously can't change the id

Yes, you right

Image

craziedde avatar Nov 16 '25 13:11 craziedde