Я не мог понять, как сделать это без жесткого кодирования имени приложения, но попробуйте что-то вроде этого:
alias topleft move screenOriginX;screenOriginY screenSizeX/2;screenSizeY/2
alias topright move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2
alias bottomleft move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2
alias bottomright move screenOriginX+screenSizeX/2;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2
layout texteditquadrants 'TextEdit' ${topleft} | ${topright} | ${bottomleft} | ${bottomright}
bind 1:ctrl layout texteditquadrants
Если у вас есть только один экран, вы можете использовать AppleScript следующим образом:
tell application "Finder"
set {0, 0, w, h} to bounds of window of desktop
end tell
tell application "System Events" to tell (process 1 where frontmost is true)
set n to number of windows
if n > 4 then set n to 4
repeat with i from 1 to n
set p to item i of {{0, 22}, {w / 2, 22}, {w / 2, h / 2 + 11}, {w / 2, h / 2 + 11}}
set position of window i to p
set size of window i to {w / 2, h / 2 - 11}
end repeat
end tell
Это создаст четыре новых окна TextEdit и разместит их на экране:
tell application "Finder"
set {0, 0, w, h} to bounds of window of desktop
end tell
set ytop to 22
set yhalf to (h - 22) / 2
tell application "TextEdit"
close windows
repeat with i from 1 to 4
make new document
end repeat
set bounds of window 1 to {0, ytop, w / 2, yhalf}
set bounds of window 2 to {w / 2, ytop, w, yhalf}
set bounds of window 3 to {0, yhalf, w / 2, h}
set bounds of window 4 to {w / 2, yhalf, w, h}
end tell