Open realliyifei opened 4 years ago
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
@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)
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.
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
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)