Open soundflix opened 1 year ago
What did you mean?
Set position and offset of multiple screens
Try this script:
import AppKit
# Получаем список всех экранов
screens = AppKit.NSScreen.screens()
screen = screens[0]
frame = screen.frame()
new_frame = AppKit.NSMakeRect(frame.origin.x + 100, frame.origin.y - 50, frame.size.width, frame.size.height)
screen.setFrame(new_frame)
Thanks for the script. I do mostly stuff in Swift. NSScreen does not have a .setScreen(..) method?! I think setting screen origins only works with Quartz services methods. I tried some things, but all settings vanish after user session ends (log-out or restart)
If you can change the screen position in the system preferences, I think it's also possible to set the position automatically.
I'm thinking about the IOKit
framework. I even set the screen resolution using this framework. I think we need to figure out how to change the screen position using Iokit.
Setting screen positions would be a good addition. Or did I miss it?