Chaoses-Ib / ObsidianShell

Associate Markdown files with Obsidian
MIT License
87 stars 4 forks source link

Is there a way to make the note open in a new window? #4

Open j-adel opened 1 year ago

j-adel commented 1 year ago

Hi! I've been using this script as a quick way to search for and open notes, using Everything program. However, it'd really help with my flow if the opened note is ina new window in obsidian (Same way as clicking on Move to new window on a tab in Obsidian.) Do you know if this is possible and how? Thanks a lot!!

Chaoses-Ib commented 1 year ago

I've tried to do this before, but Obsidian doesn't provide an API for it. There are workarounds, such as writing an Obsidian plugin to inject code, or using UI Automation to operate the GUI, but they're all a pain.

j-adel commented 1 year ago

Hi! Just wanted to inform you that Advanced URI allows for new tabs (even hover window from Hover Editor) from the URI: https://vinzent03.github.io/obsidian-advanced-uri/concepts/navigation_parameters. Of course it'd be nice if your script runs regardless of whether the user has the plugin or not. I'll check if that's possible.

Chaoses-Ib commented 1 year ago

It works like a charm! I'll release a new version in the next few days.

j-adel commented 1 year ago

That's great! btw, there's also an option to make the note open in a new window, which might be an interesting option. For me, this script is great for using it with Flow Launcher to search for and open Obsidian notes. So it'd be amazing if I could just have note open in a separate small window where I can see it and then close it without switching to Obsidian's main window.

Chaoses-Ib commented 1 year ago

Yeah, I've seen your issue at https://github.com/Vinzent03/obsidian-advanced-uri/issues/115. There are at least two ways to solve this (for Windows):

j-adel commented 1 year ago

That seems like really complicated for you to do. I've started using the Fluent Search app for an immediate preview. Will you update the shell file for the URI new tab functionality soon?😃

Chaoses-Ib commented 1 year ago

v0.4 is now released. Sorry for the late. I was busy with my school and my job.

Chaoses-Ib commented 1 year ago

Although v0.4 supports opening a note in a new window without activating the vault window, there are two problems:

The two problems are difficult to solve. So I decided to release v0.4 first. Maybe I will solve them in the future... 😩

j-adel commented 1 year ago

Oh this is awesome! This is already so great! I'm not sure there's more you can do about closing the window without creating a plugin for Obsidian. Thanks a lot :D