How to Open a Specific URL with Chrome in a Specified Window Size from the Command Line on Mac

mac
2023-12-12 09:22 (1 years ago) ytyng

Here is how to open Chrome with a specified window size from the command line on a Mac.

This method is useful when launching web applications or notes from a launcher.

open -na "Google Chrome" --args --new-window --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(500,800);window.location='https://www.example.com';</script></body></html>"

Reference

bash - Launch Google Chrome from the command line with specific window coordinates - Stack Overflow

Current rating: 5
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Archive

2025
2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011