在其他屏幕上观看视频/玩游戏时如何黑屏?

Mar*_*ase 5 display fullscreen

我有一个 2 显示设置。当我在一个屏幕上全屏显示某些内容(例如游戏或电影)时,我经常想让另一个屏幕变黑,以免分散注意力。有没有什么简单的方法可以快速使两个屏幕之一变黑,而无需进入系统设置并完全禁用该屏幕(这会导致其所有窗口重新定位等)?

mur*_*uru 5

使用xrandr挑选出要暗淡(我假设辅助监视器,如果没有卸下显示器^):

$ xrandr | awk '/ connected [^p]/{print $1}'
HDMI2
Run Code Online (Sandbox Code Playgroud)

然后使用它来关闭该显示器的亮度:

xrandr --output HDMI2 --brightness 0 
Run Code Online (Sandbox Code Playgroud)

您可以将其设置为 1 以使其再次可见:

xrandr --output HDMI2 --brightness 1
Run Code Online (Sandbox Code Playgroud)

xrandr的输出格式为:

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 32767 x 32767
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+
... 
   720x400        70.1  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 267mm
   1920x1080      60.0*+   50.0     59.9  
   1920x1080i     60.1     50.0     60.0  
...
   720x400        70.1  
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)

所以我正在寻找一个带有 的显示connected,但primary在描述中没有跟在后面。