When I code, I like to set up my desktop like this
Given that I do this often, it would be amazing if I could automate this process. I have absolutely no idea where to start with something like this. Where would be the best place to start?
When I code, I like to set up my desktop like this
Given that I do this often, it would be amazing if I could automate this process. I have absolutely no idea where to start with something like this. Where would be the best place to start?
I am not the world's greatest at Applescript, but no-one seems to be answering you, so I figure my 80% answer might be enough to get you started, and either you, or somebody else, can work out the other bit.
I think you need to approach this with Applescript, which is unique to Apple and a way of scripting, or telling applications what to do from the command-line or a script. You can either put scripts in the Automator, or, as I tend to do, put them in shell scripts that I can double-click.
This does quite a lot of what you ask:
#!/bin/bash
osascript <<EOF
tell application "Safari"
activate
tell window 1
set bounds to {0,0,1200,1200}
end tell
end tell
tell application "Terminal"
activate
tell window 1
set bounds to {1200,0,2400,600}
end tell
end tell
tell application "Finder"
activate
tell window 1
set bounds to {1200,600,2400,1200}
end tell
end tell
EOF
You an either save it on your Desktop as Setup
and then go into Terminal and make it executable (just necessary once) with:
chmod +x ~/Desktop/Setup
then you should be able to double-click it. Or you can cut off the first 2 and last 1 line and paste it into Automator
and save it on your Desktop from there to double-click.
Initially, try it with Safari open, and the Finder open, and the Terminal open but with all their windows the wrong sizes and in the wrong places and it should shuffle them around for you somewhat how you ask.
The main shortcoming is that it does not open a Safari/Terminal/Finder window if there are none open and I am not sure what is the best way to do that - hopefully someone more knowledgeable than me will assist.