bunch icon indicating copy to clipboard operation
bunch copied to clipboard

Safari URL in new window shortcut like with finder

Open kjaymiller opened this issue 3 years ago • 4 comments

Could the functionality add for finder for new windows be implemented in Safari (also Chrome/Firefox but not sure about complexity there)

Opening Finder Tabs There’s a special syntax that currently only applies to Finder. If you want multiple folders to open in tabs, list the first folder on a normal file line, then the other folders that should open in the same window with -> preceding them:

Finder
- ~/Desktop
-> ~/Documents
-> ~/Pictures

So Perhaps

Safari
- https://brettterpstra.com
-> https://bunchapp.co
-> https://github.com/ttscoff/bunch

Could open the other two windows in a new browser window.

kjaymiller avatar Feb 06 '22 16:02 kjaymiller

It's not a bad idea, but would take separate implementations for each browser and I'm not certain it's worth maintaining. Also, the normal behavior would assume new tab, not new window, so the syntax would have to only be triggered if there were -> url lines in addition to a file line. It's something I'm willing to look into, but I'd like to hear from more people that there's general interest in something like this.

For reference, when using the Finder tabs syntax it shells out the list of tabs to an AppleScript/Accessibility script that opens a new window using menu clicks, then proceeds to open a tab for each path and set the finder window to that path. Which would be easy enough to replicate in Safari, slightly harder in Chrome, and significantly harder in Firefox. Plus all the other browsers it would need to handle...

-Brett

On 6 Feb 2022, at 10:33, Jay Miller wrote:

Could the functionality add for finder for new windows be implemented in Safari (also Chrome/Firefox but not sure about complexity there)

Opening Finder Tabs There’s a special syntax that currently only applies to Finder. If you want multiple folders to open in tabs, list the first folder on a normal file line, then the other folders that should open in the same window with -> preceding them:

Finder
- ~/Desktop
-> ~/Documents
-> ~/Pictures

So Perhaps

Safari
- https://brettterpstra.com
-> https://bunchapp.co
-> https://github.com/ttscoff/bunch

Could open the other two windows in a new browser.

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/bunch/issues/199 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

ttscoff avatar Feb 08 '22 15:02 ttscoff

Perhaps there is a smarter way to do this then.

ATM my work around is this

  Safari
  - https://brettterpstra.com
  - {@n @l "https://bunchapp.co"}
  - {@n @l "https://github.com/ttscoff/bunch"}

kjaymiller avatar Feb 08 '22 23:02 kjaymiller

I suppose I could just convert the first url to @.*** @l URL returnand subsequent-> URL to ***@***.*** @l URL return. That would avoid a lot of the scripting and ostensibly work with any browser. Would just have to recognize that the app in question was a web browser, but that's a finite list to check against.

On 8 Feb 2022, at 17:35, Jay Miller wrote:

Perhaps there is a smarter way to do this then.

ATM my work around is this Safari

  • https://brettterpstra.com
  • @.*** @l "https://bunchapp.co"}
  • @.*** @l "https://github.com/ttscoff/bunch"}

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/bunch/issues/199#issuecomment-1033169658 You are receiving this because you commented.

Message ID: @.***>

ttscoff avatar Feb 10 '22 15:02 ttscoff

@ttscoff I would love this.

Also don't want to hijack this (and I can create another issue if needed) but...

I have been trying the same way as @kjaymiller (and tried other methods too) but it seems to ignore my request to use Safari ( which is not my default browser) and use Chrome (which is) but then only takes the first url. I have tried with and without pauses.

Is this an issue or user error ( i had previous tried my own commands with no joy, but now just tried Kjay's which also does not work)

EDIT: Just changed my default browser to Safari and it now works ( although I do need to include the command return after the url.

EDIT EDIT: I have now change the bunch code to the following which works with Chrome as the default browser - but it would still be nice to have a better syntax as originally suggested.

Safari
- {@l "https://brettterpstra.com"}
- {@n @l "https://bunchapp.co" return}
- {@n @l "https://github.com/ttscoff/bunch" return}

nickwild-999 avatar Mar 21 '22 08:03 nickwild-999