Utilize Apple Shortcuts in macOS to Automate Workspace Configurations

I am seeking a method to automate my workspace setup in macOS. With a single click, I envision the following sequence of events:


1. Safari should open three distinct URLs in three separate windows, each dedicated to a unique URL.

2. The Mail application should open.

3. The Messages application should open.

4. On my primary monitor, the three Safari windows should be positioned adjacent to one another (each window should occupy the entire screen from the menu bar to the bottom, and they should be aligned horizontally).

5. On my secondary monitor, Mail should occupy the left half of the screen, while Messages should occupy the right half.


I have considered utilizing the Apple Shortcuts application to accomplish this task, but I am encountering the following challenges:

A. There does not appear to be a method to open Safari in separate windows, only separate tabs.

B. There does not seem to be a way to configure windows to occupy 33% of the screen, only 50% and 25%.


Could any Apple Shortcuts app wizard provide me with an Apple Shortcuts wizard that can assist me in this endeavor? A screenshot demonstrating how to construct a shortcut with this functionality or a link to the shortcut would be greatly appreciated.

MacBook Pro 16″, macOS 26.1

Posted on Dec 11, 2025 6:10 AM

Reply
2 replies

Dec 11, 2025 3:35 PM in response to azaksalmarzur28

Hello azaksalmarzur28,


Thank you for your reply. I was able to achieve what I wanted with the Run AppleScript inside of the Apple Shortcuts app, just like you suggested. Then I just added the Shortcuts widget to my Mac desktop so I can make it run with one click.


I made some changes, now it opens six different Safari windows (four windows on my main monitor + two windows on my secondary monitor). For anyone else who might find it useful, just replace the URLs with your websites of choice and make sure the screen resolutions fit your monitors.


-- CONFIGURATION - URLS
set url1 to "https://www.apple.com/mac" -- REPLACE with your first URL
set url2 to "https://www.apple.com/iphone" -- REPLACE with your second URL
set url3 to "https://www.apple.com/watch" -- REPLACE with your third URL
set url4 to "https://www.apple.com/apple-vision-pro" -- REPLACE with your fourth URL
set url5 to "https://www.apple.com/airpods" -- REPLACE with your fifth URL
set url6 to "https://www.apple.com/tv-home" -- REPLACE with your sixth URL

-- CONFIGURATION - MAIN MONITOR
-- IMPORTANT: Check System Settings > Displays.
-- Enter the "Looks like" resolution (Logical resolution), NOT the physical specs.
set logicalWidth to 1920 -- REPLACE with your main monitor's logical width (e.g., 1920, 2560, 3024)
set logicalHeight to 1080 -- REPLACE with your main monitor's logical height (e.g., 1080, 1440, 1600)
set secondaryLogicalWidth to 864 -- REPLACE with your secondary monitor's logical width (e.g., 1920, 2560, 3024)
set secondaryOffset to logicalWidth

-- HELPER FUNCTION - IGNORE THIS
on makeSafariWindow(theURL, x1, y1, x2, y2)
	tell application "Safari"
		make new document with properties {URL:theURL}
		set bounds of front window to {x1, y1, x2, y2}
	end tell
end makeSafariWindow

-- 1. SAFARI (4 Windows, 25% width each on Primary Screen)
tell application "Safari"
	activate
	-- Window 1
	my makeSafariWindow(url1, 0, 0, logicalWidth / 4, logicalHeight)
	-- Window 2
	my makeSafariWindow(url2, logicalWidth / 4, 0, (logicalWidth / 4) * 2, logicalHeight)
	-- Window 3
	my makeSafariWindow(url3, (logicalWidth / 4) * 2, 0, (logicalWidth / 4) * 3, logicalHeight)
	-- Window 4
	my makeSafariWindow(url4, (logicalWidth / 4) * 3, 0, logicalWidth, logicalHeight)
end tell

-- 2. SAFARI (Window 5 on left portion of Secondary Screen)
tell application "Safari"
	activate
	my makeSafariWindow(url5, secondaryOffset, 0, secondaryOffset + secondaryLogicalWidth, logicalHeight)
end tell

-- 3. SAFARI (Window 6 on right portion of Secondary Screen)
tell application "Safari"
	activate
	my makeSafariWindow(url6, secondaryOffset + secondaryLogicalWidth, 0, secondaryOffset + (secondaryLogicalWidth * 2), logicalHeight)
end tell


Utilize Apple Shortcuts in macOS to Automate Workspace Configurations

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.