Use loaded var if available

This commit is contained in:
gardouille 2021-03-17 07:58:40 +01:00
parent b2c77924cd
commit bc78b9be1b
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

6
ecran
View File

@ -145,7 +145,11 @@ case "${1}" in
;;
leftof | left-of | ds | dock | dockstation | work )
#xrandr --output VGA-1 --mode 1024x768 --left-of "${PRIMARY_OUTPUT_NAME:=/dev/null}" --output "${PRIMARY_OUTPUT_NAME:=/dev/null}" --mode 1366x768
xrandr --output "${SECOND_OUTPUT_NAME:=/dev/null}" --auto --left-of "${PRIMARY_OUTPUT_NAME:=/dev/null}" --output "${PRIMARY_OUTPUT_NAME:=/dev/null}" --auto
if [ -n "${PRIMARY_OUTPUT_MODE}" ]; then
xrandr --output "${SECOND_OUTPUT_NAME:=/dev/null}" --auto --left-of "${PRIMARY_OUTPUT_NAME:=/dev/null}" --output "${PRIMARY_OUTPUT_NAME:=/dev/null}" --mode "${PRIMARY_OUTPUT_MODE}"
else
xrandr --output "${SECOND_OUTPUT_NAME:=/dev/null}" --auto --left-of "${PRIMARY_OUTPUT_NAME:=/dev/null}" --output "${PRIMARY_OUTPUT_NAME:=/dev/null}" --auto
fi
printf "%b\n" 'Xrandr for second output left-of primary screen'
;;
rightof | right-of | home )