-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Allow openmode
on commandname
or commandid
URIs
#163
Comments
openmode
on commandname
or commandid
URLsopenmode
on commandname
or commandid
URIs
Shouldn't this else case be sufficient, so you don't need to pass a mode? So you can just any filepath. I don't think, adding an open call if you pass no filepath to be opened, is a good idea. |
I finally got around to testing it, and yes, I can omit the I don't really know how the code is structured underneath, but the reason I want to be able to open a new window without specifying a file is because the command I'm running creates a new file - and thus I don't need to open a file to run the command but I do want a new window to run the command in. It would be a little nicer in this case to not have to open an intermediate file. What about allowing creating a new window with the default Obsidian "New tab" instead? That would make use cases like this cleaner. For completeness, my current URL is:
|
Is now available in v1.43.0 🎉 |
Thank you for taking the time to understand my use case and help me work through this until the feature landed! I just checked and it works exactly as I hoped. Now my URL is:
Much simpler! |
I would like to be able to specify an
openmode
and run a command afterward. My use case is to create a new window and then run the create unique note command so that I get a floating window that I can move over/around the thing I'm taking notes on without affecting my main Obsidian layout.I have a workaround for this right now because command URIs can specify
filepath
s. I had to look into the code to see what exactly had to be done to pass theopenmode
parameter to theopen
call -filepath
parameter pointing at the dummy file, and amode=overwrite
parameter (since we need to have amode
specified in order to reach the code path that callsthis.plugin.open
, also, this is why I kept the dummy file empty - it's just going to get emptied anyway)openmode
parameterMy final workaround looks something like this:
Or spread out for readability:
Not having to have a dummy file to open a new window would be strongly preferred, but this workaround does roughly what I need it to do.
The text was updated successfully, but these errors were encountered: