Even if I moved most of my browsing activities to Arc, I still find myself using Safari from time to time but there’s one thing that was driving me crazy: there’s no keyboard shortcut to copy the URL of the current page to the clipboard.
The fastest way I found in Safari is to use CMD + L to focus on the address bar, and then using CMD + C to copy it to the clipboard.
I know, it’s not much work… but I got really used to press SHIFT + CMD + C and then just paste the URL: I wanted to use something as quick with Safari as well.
The solution
Using Shortcuts, I created a really simple flow that I can run pressing CAPS + C 1 and even has a few more things to it, compared to Arc:
- It works even if Safari is not in focus, which means I can copy the URL even if I’m currently working in another app
- It copies the link and the title of the page in markdown formatting, ready to be pasted as a link
- The clipboard item is then available on all of my devices: I can read something on the iPad and copy it on the MacBook in one step
How it works
If you already know how Shortcuts work you can skip this bit.
- Get current web page from Safari grabs the webpage of the frontmost Safari window.2
- Get Page URL and Get Name target the URL and the title of the Safari window from above
- Set variable allow to rename the actions, in this case to URL and Name
- In the Text action I replicated the markdown formatting to add a link, including the actions needed
- Replace is used to get rid of the profile names that Safari adds to the beginning of the page title3
- Lastly, the Copy action copies the link, formatted in markdown, to my clipboard across all of my devices.
Note: The Receive input from… step is necessary since we enabled a keyboard shortcut for the app
As mentioned above, you can use Hyperkey to link CAPS to ⌘⇧⌥⌃ and choose the keystrokes you prefer to run the shortcut. In my case, I went with CAPS + C for now.
Download
You don’t have to do anything for the shortcut to work, but you might need to tweak the profiles names in the Replace actions.
For iPad and iOS, you have to use the Share Sheet to launch the Shortcut.