Exclude disconnected primary output
This commit is contained in:
parent
7337e99c26
commit
6290ec2d0d
2
ecran
2
ecran
|
@ -53,7 +53,7 @@ The second connected output is: ${SECOND_OUTPUT_NAME}."
|
||||||
get_primary_output_name() { # {{{
|
get_primary_output_name() { # {{{
|
||||||
|
|
||||||
## First, check if an output is already defined as primary
|
## 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 the var contains something
|
||||||
if [ -n "${local_primary_output_name}" ]; then
|
if [ -n "${local_primary_output_name}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue