blob: 2ec148e69d0914326aa630b3f94401717383b2e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
displays=(
$(xrandr | sed -rn 's#^([^ ]+) connected.*#\1#p' | grep -v '^eDP-1$')
$(xrandr | sed -rn 's#^([^ ]+) disconnected primary [0-9].*#\1#p' | grep -v '^eDP-1$')
$(xrandr | sed -rn 's#^([^ ]+) disconnected [0-9].*#\1#p' | grep -v '^eDP-1$')
)
for display in "${displays[@]}"; do
xrandr --output "$display" --off
done
xrandr --output eDP1 --primary
xrandr --output eDP-1 --primary
|