From 85003c7c36086be167978b7268177483039b1d4f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 3 Apr 2018 14:02:09 +0200 Subject: [PATCH] Disconnect all known outputs --- x-off | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-off b/x-off index 6bd4bcf..4fc0668 100755 --- a/x-off +++ b/x-off @@ -1,4 +1,6 @@ #!/bin/sh -for d in DP1 DP2 HDMI1 HDMI2 VIRTUAL1; do + +# Turn off all outputs besides the primary - connected also matches disconnected ;-) +for d in $(xrandr | grep -v primary | awk '/connected/ { print $1 }'); do xrandr --output $d --off done