Skip to content

Instantly share code, notes, and snippets.

@alialo
Created March 14, 2012 08:15
Show Gist options
  • Save alialo/2035059 to your computer and use it in GitHub Desktop.
Save alialo/2035059 to your computer and use it in GitHub Desktop.
Set window sizes to 76% and 24% of desktop size
tell application "Finder"
set {a, b, c, d} to bounds of window of desktop -- the bounds of the desktop
tell application "System Events" to tell (process 1 whose frontmost is true)
set position of window 1 to {a, b}
set size of window 1 to {((c / 100) * 76), d}
end tell
end tell
tell application "Finder"
set {a, b, c, d} to bounds of window of desktop -- the bounds of the desktop
tell application "System Events" to tell (process 1 whose frontmost is true)
set position of window 1 to {((c / 100) * 76), b}
set size of window 1 to {((c / 100) * 24), d}
end tell
end tell
@alialo
Copy link
Author

alialo commented Mar 14, 2012

Useful for keeping the browser on the left and Twitter on the right, for example. Launch using Alfred or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment