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

Add Support to Open Search Results in New Window (Notion for MacOS) #73

Open
nelsonestrada5 opened this issue Dec 15, 2022 · 3 comments
Labels

Comments

@nelsonestrada5
Copy link

nelsonestrada5 commented Dec 15, 2022

Is your feature request related to a problem? Please describe.
I constantly have multiple Notion windows open at the same time, but when i usw the ns alfred workflow, the selected result is opened in the most recently used Notion window (which is typically a notion page I want open). It would be great to have the ability to open search results in a new tab or window so that they can be complementary to the existing open tabs.

Describe the solution you'd like
The ideal solution would add another Workflow Environment Variable that is a boolean (e.g. openResultInNewWindow) that can be set by the user. When the user sets this to True, the search result selected would open a new window in the Notion Mac app.

Describe alternatives you've considered
This request, of course, works out of the box when useDesktopClient is set to false, but I much prefer the Notion Mac app.

Additional context
Thank you SO much for the workflow, it's already been such a productivity hack and a timesaver, so thank you!!

@wrjlewis wrjlewis added the enhancement New feature or request label Dec 15, 2022
@wrjlewis
Copy link
Owner

Great suggestion and thanks for raising, I'm not sure if this is possible though.
The workflow provides Alfred with a URL to open, when useDesktopClient is True the URL is notion://www.notion.so/[page].
Alfred/MacOs takes care of the rest and uses that info to open the Notion desktop which is presumable registered with notion://

Someone with more knowledge may be able to say if it is possible to tell the Notion app at the same time, to open a new window

@wrjlewis wrjlewis added the Alfred-limitation An issue caused by the Alfred software label Jan 10, 2023
@svenko99
Copy link

svenko99 commented May 9, 2024

You can open a page in a new tab using AppleScript (Run NSAppleScript):

on alfred_script(q)
  tell application "Notion" to activate
  tell application "System Events"
	tell process "Notion"
		-- Click "New Tab" in the "File" menu
		click menu item "New Tab" of menu "File" of menu bar 1
		
		-- Delay to ensure the new tab is opened
		delay 0.9
		
		-- Open the specific link in the new tab
		tell application "Notion" to open location q
	end tell
end tell
end alfred_script

The q is the URL of the page (notion://www.notion.so/[page]).

@wrjlewis
Copy link
Owner

That is good to know, thank you. I'll test this out and hopefully include in a future release.

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

No branches or pull requests

3 participants