Micke Nordin 10 months ago
parent a7cf5a9a92
commit c784d7ff72

@ -6,9 +6,9 @@ num_monitors="$(echo "${monitors}" | wc -l)"
if [[ $num_monitors -ge 3 ]]; then if [[ $num_monitors -ge 3 ]]; then
xrandr --output eDP-1 --off --output DP-4 --left-of DP-3 --primary --output DP-3 --auto xrandr --output eDP-1 --off --output DP-4 --left-of DP-3 --primary --output DP-3 --auto
else else
primary="$(echo "${monitors}" | tail -n 1)" primary="$(echo "${monitors}" | head -n 1)"
output="$(echo "${monitors}" | head -n 1)" output="$(echo "${monitors}" | tail -n 1)"
command="xrandr --output --output ${primary} --primary" command="xrandr --output ${primary} --primary"
if [[ ${output} != ${primary} ]]; then if [[ ${output} != ${primary} ]]; then
command="${command} --right-of ${output} --output ${output} --auto" command="${command} --right-of ${output} --output ${output} --auto"
fi fi

Loading…
Cancel
Save