diff --git a/ecran b/ecran index c0b213f..9f80de6 100755 --- a/ecran +++ b/ecran @@ -53,7 +53,7 @@ The second connected output is: ${SECOND_OUTPUT_NAME}." get_primary_output_name() { # {{{ ## First, check if an output is already defined as primary - local_primary_output_name=$(xrandr | grep " primary" | awk 'NR==1{ print $1 }') + local_primary_output_name=$(xrandr | grep " primary" | grep -v " disconnected" | awk 'NR==1{ print $1 }') ## If the var contains something if [ -n "${local_primary_output_name}" ]; then