chrisgrieser / shimmering-obsidian

Alfred Workflow with dozens of features for controlling your Obsidian vault.
https://alfred.app/workflows/chrisgrieser/shimmering-obsidian/
MIT License
830 stars 41 forks source link

[FR]: Allow a profile location other than `.obsidian` #92

Closed solidgonk closed 1 year ago

solidgonk commented 2 years ago

Change Requested

When using custom profiles in obsidian, e.g. ('.obsidian-macos'), the workflow setup will not be able to find the plugins, even if you have them installed. The workaround is to open to revert back to the default profile ('.obsidian') and install them there, then switch back to your regular profile. This workaround will be problematic, as the plugins in the default profile will not be updated in line with your regular profile, so a variable would be best in the long term.

Link to the relevant section of the documentation

https://github.com/chrisgrieser/shimmering-obsidian/blob/main/docs/Workflow%20Configuration.md

chrisgrieser commented 2 years ago

I will be occupied with rewriting my theme for 0.16 for a bit, but this is a good point, I haven't thought of that.

(anyone feel free to make a PR to the documentation, the variable will be a bit tricker since the path is hardcoded at a lot of places 🙈)

ryanjamurphy commented 1 year ago

aha. This is why Shimmering Obsidian has never worked for me.

I used the workaround @solidgonk suggested and now it works, hooray!

Shouldn't fixing the workflow simply be switching .obsidian for a variable in lines like https://github.com/chrisgrieser/shimmering-obsidian/blob/a62c677481bfb9fc48db28983e321df478632c41/scripts/plugin-and-theme-search.js#L71? I've never worked with Alfred workflows so I'm not sure how to get the variable from the workflow settings, but I'd be happy to figure it out and submit a PR for that if it's doable

chrisgrieser commented 1 year ago

yeah, thing is, I haven't thought of people using custom config directories, and it's hardcoded in a lot of places, in different languages (applescript, js, shell, alfred vars etc.), which makes it simply a time-consuming task of modifying it everywhere.

I simply haven't gotten around to do it yet. but yeah, the named workaround (or simply renaming the config folder back) is probably the easiest way for now 😅

ryanjamurphy commented 1 year ago

Fair enough.

A stubborn alternative to the above workaround:

  1. Quit Alfred
  2. Open up Alfred's Shimmering-Obsidian workflow folder in VS Code
  3. Find and replace .obsidian with .your-config-folder, where appropriate (be careful not to replace the instances of .obsidian that are in URLs)
  4. Never update 🙃

At least this way plugins and other features that actively depend on the .obsidian path should keep working. At least, so far so good!

chrisgrieser commented 1 year ago

okay, with the great refactor for version 4.0, this has been implemented as well

Pasted image 2023-08-11 at 10 01 33@2x