Open New Tab Adjacent to the Current Tab in Safari on macOS Ventura

Here is the behavior of Safari tabs work on macOS:

The behavioral mismatch is annoying. If I am working on a window with three tabs and I want to research something about the tab I am currently reading I want the new tab to open directly next to the current tab, generally.

To fix this you can use Automator, Apple Script, and Settings keyboard shortcuts.

Automator

  1. Launch Automator and create a New “Quick Action”
  2. Set the Workflow to receive no input in Safari
  3. Drag in a “Run AppleScript” item
  4. Paste in the following code
  5. Save the Workflow as “Safari New Tab Adjacent”
tell application "Safari"
    tell front window
        set _old_tab to current tab
        set _new_tab to make new tab at after _old_tab
        set current tab to _new_tab
    end tell
end tell

System Settings

  1. Open System Settings
  2. Click Keyboard in the sidebar
  3. Click Keyboard Shortcuts button
  4. Click Services in the sidebar
  5. Drop down General
  6. Enable “Safari New Tab Adjacent” and give it a shortcut like ^⌘T

This is an update to a post on Daring Fireball using no additional software.