Skip to content

Instantly share code, notes, and snippets.

@jaredlwong
Last active August 29, 2015 14:02
Show Gist options
  • Save jaredlwong/0768d9dfac0c0a6f6e75 to your computer and use it in GitHub Desktop.
Save jaredlwong/0768d9dfac0c0a6f6e75 to your computer and use it in GitHub Desktop.
Make all windows in OS X maximized using applescript
#!/usr/bin/osascript
-- Save as fullscreener.applescript
tell application "Finder"
set {x1, y1, x2, y2} to (bounds of window of desktop)
end tell
tell application "System Events"
repeat with aProcess in processes
set aProcessName to get name of aProcess
tell process aProcessName
set windowCount to (count of windows)
if windowCount is greater than 0 then
repeat with aWindow in windows
set position of aWindow to {x1, y1}
set size of aWindow to {x2 - x1, y2 - y1}
end repeat
end if
end tell
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment