obsidian-alfred icon indicating copy to clipboard operation
obsidian-alfred copied to clipboard

Can I bypass vault selection if I only have 1 vault?

Open kenanmike opened this issue 3 years ago • 7 comments

I only have one vault so would like to skip the step of having to choose the vault when it comes to creating a new empty note, for example. Is this possible?

kenanmike avatar Jul 22 '21 08:07 kenanmike

That's not possible right not. I'll consider implementing it in a future release.

hauselin avatar Jul 22 '21 14:07 hauselin

Hey @hauselin, can I try working on this? I would like to add some other features too, like option add a note directly via alfred. But this seems a good starting point.

sanchitsharma avatar Sep 03 '21 16:09 sanchitsharma

Hey @sanchitsharma, yes, go ahead and take a stab at it! Thanks!

hauselin avatar Sep 04 '21 17:09 hauselin

Thanks!!. Will do.

sanchitsharma avatar Sep 06 '21 09:09 sanchitsharma

@hauselin I looked at the workflow in detail, and I think the best way to provide this functionality would be the following. introduce two new variables - defaultVaultPath and defaultVaultName add a new input "oadddefaultvault" to change/add the default vault name and path. on addition of first new vault, it is automatically made the default vault as well (it can be changed via above input anytime later) current "on" keyword is remapped to "onv" (v=vault) "on" is now used to add directly to add to the default vault [Vault name shown in title by showing "Creating {query} in {defaultVaultName}]"

I have done a basic testing of above flow. Please let me know your thoughts.

sanchitsharma avatar Sep 06 '21 18:09 sanchitsharma

@hauselin I looked at the workflow in detail, and I think the best way to provide this functionality would be the following. introduce two new variables - defaultVaultPath and defaultVaultName add a new input "oadddefaultvault" to change/add the default vault name and path. on addition of first new vault, it is automatically made the default vault as well (it can be changed via above input anytime later) current "on" keyword is remapped to "onv" (v=vault) "on" is now used to add directly to add to the default vault [Vault name shown in title by showing "Creating {query} in {defaultVaultName}]"

I have done a basic testing of above flow. Please let me know your thoughts.

I am basing above thought on the philosophy that many users will like to have a default vault at least even if they they don't just have a single vault. Users with single vault will directly be able to use the functionality without any configuration. Also we can use the default vault config to add other default functionalities as well, example search etc.

sanchitsharma avatar Sep 06 '21 18:09 sanchitsharma