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

mac
2023-12-12 00:22 (2 years ago)
Pixel-Sized Ritual
Play a song themed on this article

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

Please rate this article
Current rating: 5.0 (1)
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive