获取Node.js中具有分辨率的物理屏幕列表

问题描述

我有2个以上的物理监视器(1680x1050、1920x1080),它们被归为一个“屏幕”(3600 x 1080):

Screen 0: minimum 320 x 200,current 3600 x 1080,maximum 16384 x 16384
DVI-I-1 connected primary 1680x1050+1920+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050     59.88*+
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
HDMI-1 disconnected (normal left inverted right x axis y axis)
VGA-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x800      59.81  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  

我想找出带有尺寸的屏幕列表。 X11 \ GTK的限制对我来说完全可以。

我已经尝试过screen-infonode-x11(两者都输出单个3600 x 1080屏幕)。我知道NW.js和Electron中可能存在一些有用的绑定,但是我的应用程序不应该使用此包装器。

当然,我可以解析原始xrandr的输出,但是我的问题是,是否有一些更方便的方法可以做到这一点。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...