Created
February 28, 2016 13:37
-
-
Save arleym/25d07237d9591817c096 to your computer and use it in GitHub Desktop.
Alfred Layout Alpha
This file contains 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
on alfred_script(q) | |
tell application "Google Chrome" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Chrome" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {0, 21} | |
set size of window x to {1280, 709} | |
end repeat | |
end try | |
end tell | |
tell application "Mail" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Mail" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {1280, 732} | |
set size of window x to {1280, 709} | |
end repeat | |
end try | |
end tell | |
tell application "HipChat" to activate -- needs to be in front | |
tell application "System Events" to tell application process "HipChat" | |
try | |
get properties of window 1 | |
set position of window 1 to {1280, 732} -- eye ballin | |
set size of window 1 to {770, 709} | |
end try | |
end tell | |
tell application "Slack" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Slack" | |
try | |
get properties of window 1 | |
set position of window 1 to {1280, 732} -- eye ballin | |
set size of window 1 to {800, 709} | |
end try | |
end tell | |
tell application "Sublime Text" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Sublime Text" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {0, 732} | |
set size of window x to {1280, 709} | |
end repeat | |
end try | |
end tell | |
tell application "SourceTree" to activate -- needs to be in front | |
tell application "System Events" to tell application process "SourceTree" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {2051, 732} | |
set size of window x to {510, 709} | |
end repeat | |
end try | |
end tell | |
tell application "iTerm" to activate -- needs to be in front | |
tell application "System Events" to tell application process "iTerm" | |
try | |
get properties of window 1 | |
set position of window 1 to {1281, 21} | |
set size of window 1 to {1280, 714} | |
end try | |
end tell | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a workflow with a few "L " prefixed commands. I use Divvy for most on-the-fly stuff, but a mass resize is often needed, particularly when switching from laptop to external monitor.
Things to consider: