Hacker News new | ask | show | jobs
by slowhands 2997 days ago
Just a quick question for current Phoenix users — how is the multiple monitor performance? By that I mean a situation where I'm going from just the MacBook screen to three monitors on one desk to four monitors on another desk. Will it automatically detect how many monitors are present, without having to resort to hardware-specific configurations? This is a killer feature for me on Hammerspoon, but I much rather script with JS than Lua, out of familiarity.
1 comments

I'm not entirely sure what you mean with performance, macOS is pretty sluggish at reacting to new monitors anyway.

That said, Phoenix has an event for when the screens change, you can use it to react, enumerate the new screens, etc. Something like:

Event.on('screensDidChange', () => { const sizes = Screen.all().map(s => s.flippedVisibleFrame()); })

Hope that helps!