i3wm 禁用笔记本电脑屏幕

Dif*_*sio 4 i3-wm 14.04

使用 i3wm 可以完全禁用我的内置屏幕吗?

我知道如何在 Unity 中做到这一点,但我无法搜索任何有意义的内容。

小智 5

您可以使用xrandr

从终端发出以下命令以查看所有已连接显示器的列表:

xrandr
Run Code Online (Sandbox Code Playgroud)

你会得到类似的东西:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)

您可能会LVDS1VGA1或下看到主输出和辅助连接的显示器HDMI1

在这种情况下,要关闭主显示器,请使用:

xrandr --output LVDS1 --off
Run Code Online (Sandbox Code Playgroud)

要重新打开它:

xrandr --output LVDS1 --auto
Run Code Online (Sandbox Code Playgroud)

请记住,如果您在没有其他连接的情况下关闭主显示器,X 将在您的主显示器上重新启动。