by zeroz · 2y ago · 0 comments
Here an example of my "Dev1" setting with three displays (two 27" external 4K displays and one 14" MacBook). Move Firefox to the first display and leave 50 pixel space for the left side dock. Move IntelliJ IDEA to the second and iTerm2 to the MacBook screen. Works reliable.
use application "System Events"
get (every window of process "firefox" whose value of attribute "AXMinimized" is false)
repeat with W in the result
set position of W to {50, 0}
set size of W to {1870, 1080}
end repeat
get (every window of process "idea" whose value of attribute "AXMinimized" is false)
repeat with W in the result
set position of W to {1920, 0}
set size of W to {1920, 1080}
end repeat
get (every window of process "iTerm2" whose value of attribute "AXMinimized" is false)
repeat with W in the result
set position of W to {1125, 1100}
set size of W to {1510, 940}
end repeatHonestly, I've tried a bunch of things, including different monitor setups and apps that intend to put everything back in their place, but none of it was reliable, windows would still get shuffled around. My time is just worth more than the power consumption of an idling Mac. My monitors do get sleep, and even that sometimes rearranges the windows, but it works like 99% of the time. Why is this so hard to get right Apple?
(Yes it's just a satire of people who pick random UX failures like that to say Linux is unusable as a daily driver, as if MacOS and Windows were flawless)