Skip to content

Instantly share code, notes, and snippets.

@natterstefan
Created October 2, 2020 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natterstefan/fae9cd98f0fb256a51f84f1d00c0ac27 to your computer and use it in GitHub Desktop.
Save natterstefan/fae9cd98f0fb256a51f84f1d00c0ac27 to your computer and use it in GitHub Desktop.
Automatically resize apps for Streaming

Automatically resize apps for Streaming

Automatically resizes Chrome and VS Studio code to 1920x1080 for my 49-inch (5120 x 1440) monitor.

set apps to {"Google Chrome"}
repeat with thisApp in apps
tell application thisApp
activate
set the bounds of the first window to {1600, 180, 3520, 1260}
end tell
end repeat
# https://stackoverflow.com/a/58305511/1238150
# https://stackoverflow.com/a/60929113/1238150
tell application "System Events" to ¬
get {position, size} of window 1 of process "Electron"
tell application "System Events"
tell (window 1 of process "Electron")
set its size to [1920, 1080]
set its position to [¬
1600, ¬
180]
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment