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

[FEATURE] Shortcut + L/R to move the tabs on the L/RHS to a new safari window #39

Open
realliyifei opened this issue Sep 17, 2020 · 4 comments

Comments

@realliyifei
Copy link

realliyifei commented Sep 17, 2020

I love to open a new safari window for every new main searching topic, for instance, safari window A (9 tabs) for topic A, safari window B (17 tabs) for topic B.

However, sometimes I don't realize that the searching topic is big enough to open a new safari window until I already opened several tabs for it. In this case, I have to move these tabs one-by-one to a new window and it's inconvenient and time-consuming.

It would be helpful if we can have new shortcut + L/R to move the tabs on the left/right-hand side to a new safari window and then close them.

(while currently ctrl+L/R closes them directly)

@gingerbeardman
Copy link

gingerbeardman commented Sep 18, 2020

FWIW, I do this using Alfred, running the following script on a hotkey:

on alfred_script(q)

tell application "Safari"
	set original_window to front window
	set tab_index to index of current tab of original_window
	
	make new document
	move tabs tab_index thru -1 of original_window to front window
	close first tab of front window
end tell

end alfred_script

Screen shot 2020-09-18 at 11 42 47

@realliyifei
Copy link
Author

@gingerbeardman Thanks for your suggestion. Now I set

moving the tabs on RHS by

move tabs tab_index thru -1 of original_window to front window

moving the tabs on LHS by

move tabs tab_index thru 0 of original_window to front window

But now they contain the current tab as well. How can I move the tabs on RHS except for the current one? (works like this safari extension)

@realliyifei realliyifei reopened this Sep 19, 2020
@gingerbeardman
Copy link

When I do this I want them to contain the current tab.

But tab_index is the current tab so try tab_index+1? I haven't tested this.

@realliyifei
Copy link
Author

realliyifei commented Sep 19, 2020

Thanks, it works. I put it on github! It should be

moving the tabs on RHS by

move tabs (tab_index - 1) thru -1 of original_window to front window

moving the tabs on LHS by

move tabs (tab_index + 1) thru 0 of original_window to front window

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

No branches or pull requests

2 participants