conf2/wm/script/autoxrandr

12 lines
345 B
Plaintext
Raw Permalink Normal View History

2018-06-13 19:38:45 +00:00
#!/bin/bash
for output in $(xrandr | grep '\Wconnected' | awk '{ print $1 }'); do
if [[ $output =~ ^DP-1*$ ]]; then
lvds=$output
fi
done
for output in $(xrandr | grep '\Wconnected' | awk '{ print $1 }'); do
if [[ ! $output =~ ^DP-1*$ ]]; then
xrandr --output $lvds --primary --auto --left-of $output
fi
done