GithubHelp home page GithubHelp logo

4source / settings-profiles-obsidian-plugin Goto Github PK

View Code? Open in Web Editor NEW
45.0 1.0 1.0 321 KB

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.

Home Page: https://forum.obsidian.md/t/settings-profiles-plugin-release/76657

License: MIT License

JavaScript 2.17% TypeScript 97.01% CSS 0.82%
obsidian obsidian-plugin obsidian-md

settings-profiles-obsidian-plugin's Introduction

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.

Demo

SettingsProfiles-VaultSwitchDemo_v5 The demo shows creating a new profile for an existing vault with a theme set and plugin installed. Then a new vault is created and settings profiles are installed. After installation, the previously created profile will be automatically recognized. This is selected and loads all settings including themes and plugins. The newly created vault will then have the same settings as the existing vault.

Usage

After enabling the plugin in the settings menu, you need to create a new profile.

You can do this in the settings tab. Just click on the "Add new Profile". Give it a name and select whitch options should be enabled. To switch between profiles click on "Switch to Profile" obsidian should reload.

Features

  • Multible profile settings
  • Easy and fast switch settings
  • Global settings

Plugin Settings

Profile save path

The path to store the global settings profiles. The data for the profiles is stored here. Inside there are folders for each profile there are named like the profile. In order for the profiles to be loaded, this path must point to a folder that contains profiles. This must be configured separately for each vault and device. You can also use a relative path. You must click the Change button for the changes to take effect. This will appear when you change the path.

Default: Based on XDG specification $XDG_DATA_HOME/ObsidianPlugins/Profiles

UI update

This controls whether the UI elements are activated. You must click the Change button for the changes to take effect. This will appear when you change the setting.

Default: true

UI update interval

This controls how often the UI of this plugin should be updated. You must click the Change button for the changes to take effect. This will appear when you change the setting. This could affect Obsidian's performance.

Only visible if UI update enabled.

Min: 100ms Max: 5000ms

Default: 1000ms

Profile update

This setting controls whether changes in the settings should be monitored. You must click the Change button for the changes to take effect. This will appear when you change the setting.

Default: true

Profile update delay

This setting controls how much time must pass after a change before checking whether the changes affect the profile. If changes relevant to the profile have been made and Auto-Sync is enabled, the changes are updated. You must click the Change button for the changes to take effect. This will appear when you change the setting. This could affect Obsidian's performance.

Only visible if Profile update enabled.

Min: 500ms Max: 10000ms

Default: 800ms

Profiles plus Button

Let you create a new profile with the current settings. Pressing on it will open a new window Profile options here you can configure the profile.

Profiles refresh-cw Button

The profiles list below will be reloaded from the files.

Profiles list

As soon as you have created a profile, all profiles stored in the Profile save path will be listed here.

Profile settings Button

Let you cange the Profile options for the profile.

Profile trash-2 Button

Deletes this profile and all settings. Attention! This will delete this profile globally. You can no longer access it in any vault.

Profile save Button

Lets you save the current settings to the profile. Attention! This will overwrite the current settings in this profile and cannot be undone. Is disabled if the profile settings match the current setting.

Profile Status user-check Button

This shows which profile is currently active. Pressing will deselect the current profile.

Profile Status user Button

Indicates that this profile is not selected. By pressing this button you can switch to this profile. In order for the settings to be adopted, Obsidian must be reloaded.

Profile options

Name

Containes the name of the profile.

Auto-Sync

If activated, changes in the settings are automatically saved as long as the profile is active and Profile update is enabled.

Apperance

Controls whether the appearance settings should be saved in this profile. This includes CSS snippets and themes.

App

Controls whether the app settings should be saved in this profile. The app settings includes the "Editor"-tab and "Files and links"-tab.

Bookmarks

Controls whether the bookmarks should be saved in this profile.

Community plugins

Controls the community plugins should be saved in this profile. This includes which plugins are activated, the source code and the settings that were made for the plugin.

Core plugins

Controls wheter the core plugins settings should be saved in this profile.

Graph

Controls wheter the graph settings should be saved in this profile.

Hotkeys

Controls wheter the hotkeys settings should be saved in this profile.

Status-Bar

Status-Bar users

Will be displayed if no profile is selected. Clicking on it will open the Profile Switcher.

Status-Bar user-check

Will be displayed if profile is selected with no unsaved or unloaded changes to this profile. The name of the current profile is displayed to the right. Clicking on it will open the Profile Switcher.

Status-Bar user-x

Will be displayed if profile has unsaved changes. The name of the current profile is displayed to the right. If you click on it, the unsaved settings will be saved.

Status-Bar user-cog

Will be displayed if profile has unloaded changes. The name of the current profile is displayed to the right. If you click on it, the unloaded settings will be loaded. In order for the settings to be adopted, Obsidian must be reloaded.

Commands

Settings profiles: Open profile switcher

To switch to other settings profile or create a new one.

Settings profiles: Show current profile

Displays the current settings profile.

Settings profiles: Save current profile

Save the settings of current profile.

Settings profiles: Reload current profile

Load the settings of current profile from files.

Settings profiles: Update profile status

Updates the UI elements.

Admittance

Access file outside vault

Is requiered to save setting profiles at a global space so they could be accessed from different vaults.

Contribution

Feel free to contribute.

You can create an issue if you found a bug, have an idea to improve this plugin or ask a question. Please make sure beforehand that your issue does not already exist.

Or instead create a pull request to contribute a bug fix or improvement for this plugin.

Not a developer but still want to help? You can help with testing. Either you test the current version for possible problems or, if there are currently any, you can also test pre-releases (alpha/beta). This can be easily accomplished if you install VARE. Any version of this plugin must be installed. Then simply go to VARE's Settings tab and select the version you want to test from the drop-down menu. You could also add this plugin manually just plusAdd unlisted plugin and enter 4Source and settings-profiles-obsidian-plugin. If you found a bug or unexpected behavior create an issue with the version you have tested. Before creating an issue, make sure you know how to reproduce the bug. If there is already an issue for the bug you found that is still open but you have additional information, add it to the issue.

For more info see CONTRIBUTING

Support

If you want to support me and my work.

BuyMeACoffee

settings-profiles-obsidian-plugin's People

Contributors

4source avatar mara-li avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mara-li

settings-profiles-obsidian-plugin's Issues

[FEAT]: Plugin favorites list

Description of the unfavorable solution

Obsidian does not support favorites list for plugins. There is no way to remember a plugin without installing it.

Describe the feature you would like to have

Globally saved plugin favorites list so it can be accessed from all vaults.

  • An icon for the favorites list should be displayed in the "Browse plugins window"/"installed plugins list"
    - Icons: Bookmark, Bookmark Plus, Bookmark Minus
  • Toggle button in browser plugin window “Show favorites only”

Additional context

Unbenannt

[FEAT]: Support for multiple devices

Description of the unfavorable solution

At the movement plugin don't supports multiple devices with more than one profile.

Known issues:

  • Different profiles on devices overrides profiles

Describe the feature you would like to have

Save aktive profile at different position may use workspace

Additional context

No response

[FEAT]: Auto update profile option

Is your feature request related to a problem?

  • The feature should solve a problem.

Describe the Problem your feature should fix.

If you are in a profile and you modify the configuration of the plugins it is not saved automatically, if I change the profile I lose the current configuration.

Describe the feature you would like to have.

A checkbox in the profile selection so that that profile is automatically updated when modifying something within obsidian.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

[FEAT] Allow to Sync Templates

Additional option for Profile to Sync Templates

Use the Template folder specified in settings and only sync files in folder

[Bug]: Failed to switch profile

Describe the bug

Hello, this is a very interesting plugin. Sadly, I have the same error over and over again : Failed to switch profile.
I'm on Windows.

How to Reproduce

01 I create a profile
02 save it
03 Try to load it in the same vault or in another vault
04 Failed

Expected behavior

No response

OS of your device

win 11

Obsidian Version

v1.5.4

Plugin Version

0.3

Additional context

Also, when appearance is turned on when saving the profile, nothing else will be created in the profile folder.
If appearance is turned off, the plugin will save all the other parameters minus appearance of course

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

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

[FEAT]: Separate theme and accent color from other appearance settings

Description of the unfavorable solution

Sometimes one enters something in a new note only to discover that they are in the wrong vault. One of the ways I try to combat that is by different theme/accent. So I want those to be per vault but I want other appearance settings (font, use native menu, etc) to be synced.

Describe the feature you would like to have

Separate "Color settings" from other settings
Thanks

Additional context

No response

[FEAT]: Allow a relative path for the Profiles folder

Description of the unfavorable solution

The current settings expects Profile Path to be an absolute path to somewhere on the computer. This doesn't mesh well with the Obsidian folders being shared to other computers.

Describe the feature you would like to have

I want the path to be my relative to my obsidian vault as something like ..\Profiles. This way both can be under a folder which is automatically synced to the cloud.

Additional context

This of course will only work if all the vaults in question are at the same relative path on the computer. But without such an adaptation, I think this plugin is only viable on single computer vaults, or on a series of computers that have vaults all on the same absolute path.

[FEAT]: Zipped release for manual install

Description of the unfavorable solution

In order to install the plugin manually, you have to download the three files individually, then create a folder and rename it with the plugin id and put these files in it.

Describe the feature you would like to have

I know these files are needed for automatic installation to work, but it would be much easier for the user to be able to download a zipped file also from the releases tab in the following configuration:

plugin-id-{v}.zip
    plugin-id\
        main.js
        manifest.json
        styles.css

This way we can just extract the zip file in the plugin folder. Thank you.

Additional context

No response

[Bug]: Default directory is always created on install

Describe the bug

I am starting to use obsidian more lately and this plugin has helped a lot with creating a reproducible pattern between vaults, but every time I install it in a different vault, the ~/Documents/Obsidian directory gets created, so I end up with two "Documents" directories in my home, my localized "~/Documentos" directory and this plugin's "~/Documents".

How to Reproduce

  1. Create vault
  2. Install plugin
    It then creates ~/Documents regardless if I will use it or not

Expected behavior

It should either use the XDG specification or have no default directory at the very least. I don't expect you to adopt XDG specs, but I will say that ~/.local/share/Obsidian/Profiles is much more clean than ~/Documents/Obsidian/Profiles.

But for the purposes of this bug report, I think at least removing the hardcoded, non-localized, ~/Documents default path and replacing it with literally anything else (XDG spec/somewhere inside the vault/nothing at all) is fine.

OS of your device

Linux (Pop OS)

Obsidian Version

v1.5.12

Plugin Version

v0.5.6

Additional context

No response

[BUG] Change Path Issue

Describe the bug

  1. When I tried to change path, it did not allow to change the path as I required, instead it created a duplicate file paths eg. /Users/test/Profiles, when I change, it will create /Users/test/Profiles/Users/test/Profiles
  2. Another issue is that it did not load the profiles that was created even though default path was used
image

How to Reproduce

Repeat the steps to change path

Expected behavior

Reflect the correct path

OS of your device

macOS

Obsidian Version

v1.5.3

Plugin Version

0.5.1

Additional context

No response

[FEAT]: Automatic sync

Description of the unfavorable solution

I always have to remember to run the reload/save command when I make config or UI changes. This is cumbersome and dangerous (if I do some things in one open window (vault) and other changes in another window.

I either have to assign one vault to make changes in and save afterwards, or remember to run the reload command to sync settings before making changing in other vaults (changes that I want to be synced to all).

Describe the feature you would like to have

I want to hear your take on this. How can we solve it?

There are multiple choices I can think of:

  • Assign "donor" vaults and "recipient" vaults. Donor vaults always save to profile save path and recipient vaults only take. If the user employs the suggested automatic commands, then changes made in recipient vaults are not saved to other vaults, but do we overwrite them on next startup from profile save path?
  • Monitor changes made inside .obsidian folder and sync on changes.
  • A mix of both?

Additional context

No response

[Bug]: Changing "Profile" path in settings create a recursive duplications o a the current "profile" folder, do to the depth >100 folder

Describe the bug

Edit the path in "Profile folder" location, then press change.
The contents of that folder are then copied into a path going down over 100 directories deep.

How to Reproduce

  1. Using Windows with the "Profile" directory in my 'local" OneDrive folder: C:\users\marcm\OneDrive\Obsidian\Profile
  2. I have one profile "Common"
  3. Change path to "C:\users\marcm\OneDrive\Obsidian\SettingsProfile"
  4. The contents of "C:\users\marcm\OneDrive\Obsidian\Profile\Common" are copied recursively into "C:\users\marcm\OneDrive\Obsidian\Profile\Common" to de depth of > 100. I killed the process as Obsidian stopped repsonding.
  • I have tried this on three different vaults the same thin happens. OneDriver start complaining when the path exceed 255 characters.
  • Trying to clean-up with the "File Explore" doesn't it just freezes.
  • Cleaning using another file manager crashes when the path length exceeded 1022 character.
  • I had to "go offline" , make a copy of the folder on OneDrive Online.
  • Boot my computer off a Linux Live CD, then delete the local folder. Windows GUI apps seem to be incapable of dealing with the path of this length.

Expected behavior

No response

OS of your device

Windows 10

Obsidian Version

1.5.3

Plugin Version

0.4.1

Additional context

No response

[Bug]: Can't load Profiles, Empty Profile list

Describe the bug

I can save profiles, but I cannot load or even see them is the Profile List.
Tested:

  • Using predefined and custom Path
  • Using main and sandbox Vault
  • Restarting
  • Overwriting existing Profile

How to Reproduce

  1. Open Sandbox Vault or Private Vault (Tested both)
  2. Install Plugin
  3. Save Settings
  4. Nothing to see in the List

Expected behavior

No response

OS of your device

MacOs Sonoma 14.2.1 (23C71)

Obsidian Version

Version 1.5.8 (Installer 1.4.16)

Plugin Version

0.5.1

Additional context

I get this Error when saving a Profile
Screenshot 2024-02-25 at 18 15 02

This is the saved Profile:
Screenshot 2024-02-25 at 18 20 12

And this is the profile.json:

{
  "name": "Test-Profile",
  "autoSync": true,
  "appearance": true,
  "app": true,
  "bookmarks": true,
  "communityPlugins": true,
  "communityPluginsAdvanced": {},
  "corePlugins": true,
  "graph": true,
  "hotkeys": true,
  "modifiedAt": "2024-02-25T17:13:34.718Z"
}

[FEAT]: Obsidian Release v1.6

Description of the unfavorable solution

The loading of changed settings is annoying because of reload complete obsidian.

Describe the feature you would like to have

Obsidian release v1.6 mentioned under Improvements

Hotkeys and property types are now automatically reloaded if the settings are modified outside of Obsidian.

Needs to be tested what is affected by this

Additional context

No response

[Bug]: Overrides Profiles

Describe the bug

When switching profile in settings tab the previous selected profile gets overridden with the settings from profile where to switch to.

How to Reproduce

  1. Create 2 Profiles with different settings
  2. Switch from one to the other

Expected behavior

Previous profile settings should be saved. And settings from new profile should be loaded.

OS of your device

Win10

Obsidian Version

v1.5.3

Plugin Version

0.4.0

Additional context

No response

[Bug]: Unable to save initial profile

Describe the bug

The value for profile location is C:\Users\Windows\Documents\Obsidian\Profiles. This only exists and is accessible if the computer is windows, has an account named windows and that user is active. On this computer, the folder doesn't exist. I am unable to change it or to create a profile on this machine.

How to Reproduce

It probably came about because Dropbox sync copied everything from another computer which had this directory. But now that folder is inaccessible, the field can't successfully be edited.

Expected behavior

No response

OS of your device

Win10

Obsidian Version

v1.5.3

Plugin Version

0.4.1

Additional context

I am experimenting to see if I can get C:\Obsidian\SettingsProfiles to be a usable profile directory.

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

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

[FEAT]: Theme configuration in the profile

Is your feature request related to a problem?

  • The feature should solve a problem.

Describe the Problem your feature should fix.

No response

Describe the feature you would like to have.

When you save a profile your theme settings are also saved. This way the profile would be even more complete.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

[FEAT]: Import/Export Settings

Description of the unfavorable solution

Currently there is no option to share or backup the settings.
Share settings could be interesting for plugin bug reproducing.

Describe the feature you would like to have

image
In Settings Tab additional buttons:

  1. To export profile to a file
    Opens a file explorer with the file name set to profile name and allowing to select the position where to store the profile
  2. To compare a profile against a profile stored in file
    Opens a file explorer letting you select aexported profile. Than Opens a Diff(git) Modal which let you compare the settings of a profile against the file. Let you apply settings from file to profile or profile to file
  3. To import profile from file
    Opens a file explorer letting you select a exported profile to import. Let you adjust the name the imported profile should have.

Additional context

No response

[Bug]: Other profiles not visible in the other vaults

Describe the bug

The other profiles are not visible in the other vaults.

How to Reproduce

Hello,

I am on Windows 10.
I created 2 profiles for 2 different vaults.
Here: "..Documents\Obsidian\Profiles"
But in the plugin settings only one profile is visible in vault 1.
And in vault 2 again only one profile is visible.
But there should be 2 profiles visible in every vault for switching profiles, am I right?
Is the "Reload Profiles" button working on your site?
I looked into my hard drive path for the profiles, and both profiles are visible there! But not in Obsidian in your settings plugin page.
I even created a new vault but with the same result.

Expected behavior

Profiles should be visible in every vault.

OS of your device

Win10

Obsidian Version

1.5.3

Plugin Version

0.3.0

Additional context

No response

[FEAT]: Include/exclude certain plugins

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

[FEAT]: New plugin idea - sync plugins

Is your feature request related to a problem?

  • The feature should solve a problem.

Describe the Problem your feature should fix.

If you have several vaults you have to update and configure the plugins in each vault, it is quite annoying.

Describe the feature you would like to have.

(I know this is not for this plugin, but I think something like this would be very useful for another plugin, I just wanted to convey the idea, I did not know where to do it)

The idea is to have a plugin to synchronize plugins between vaults with an optional option to synchronize configurations.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

[FEAT]: Choosing the community plugin version

Description of the unfavorable solution

Currently, Obsidian only allows plugin updates. But sometimes you would like to switch back to an older version. Also, pre-releases cannot be installed.

Describe the feature you would like to have

In the profile options there should be an advanced option for "Community plugins" there all installed plugins get listed whit a drop-down containing all releases (including pre-releases) fetched from GitHub + option latest.

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.