Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
j-adel opened this issue Jan 19, 2023 · 9 comments
Open

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

j-adel opened this issue Jan 19, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@j-adel
Copy link

j-adel commented Jan 19, 2023

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 Chaoses-Ib added the enhancement New feature or request label Jan 19, 2023
@Chaoses-Ib
Copy link
Owner

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
Copy link
Author

j-adel commented Feb 20, 2023

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
Copy link
Owner

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

@j-adel
Copy link
Author

j-adel commented Feb 21, 2023

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
Copy link
Owner

Chaoses-Ib commented Feb 21, 2023

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

  • Before opening a note in a new window, save the visibilities and z-orders of all Obsidian windows and move the invisible ones to off screen. After opening, restore their visibilities, z-orders and positions.
  • After opening, always hide the Obsidian window below the current one.

@j-adel
Copy link
Author

j-adel commented Mar 5, 2023

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
Copy link
Owner

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

@Chaoses-Ib
Copy link
Owner

Chaoses-Ib commented Mar 12, 2023

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

  • If the vault hasn't been opened, then the vault window and any windows in the workspace will be displayed.
  • When you close the window, the vault window will be activated.

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
Copy link
Author

j-adel commented Mar 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants