Exclude disconnected primary output

This commit is contained in:
gardouille 2020-10-23 10:16:11 +02:00
parent 7337e99c26
commit 6290ec2d0d
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

2
ecran
View File

@ -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