Automatically resizes Chrome and VS Studio code to 1920x1080 for my 49-inch (5120 x 1440) monitor.
Created
October 2, 2020 17:33
-
-
Save natterstefan/fae9cd98f0fb256a51f84f1d00c0ac27 to your computer and use it in GitHub Desktop.
Automatically resize apps for Streaming
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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