Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
25 lines
991 B
Bash
25 lines
991 B
Bash
# Keep existing value if it is already non-empty
|
|
if [[ -z "${AVALONIA_GLOBAL_SCALE_FACTOR-}" ]] && command -v gsettings >/dev/null; then
|
|
echo 'Attempting to get GNOME desktop interface scaling factor' >&2
|
|
AVALONIA_GLOBAL_SCALE_FACTOR="$(gsettings get org.gnome.desktop.interface scaling-factor)"
|
|
AVALONIA_GLOBAL_SCALE_FACTOR="${AVALONIA_GLOBAL_SCALE_FACTOR##* }"
|
|
fi
|
|
|
|
if [[ "${AVALONIA_GLOBAL_SCALE_FACTOR-}" == "0" ]]; then
|
|
echo 'Unset invalid scaling value' >&2
|
|
unset AVALONIA_GLOBAL_SCALE_FACTOR
|
|
fi
|
|
|
|
if [[ -z "${AVALONIA_GLOBAL_SCALE_FACTOR-}" ]] && command -v xrdb >/dev/null; then
|
|
echo 'Attempting to get scaling factor from X FreeType DPI setting' >&2
|
|
dpi="$(xrdb -get Xft.dpi)"
|
|
if [[ -n "${dpi}" ]]; then
|
|
AVALONIA_GLOBAL_SCALE_FACTOR=$(echo "scale=2; ${dpi}/96" | bc)
|
|
fi
|
|
fi
|
|
|
|
if [[ -n "${AVALONIA_GLOBAL_SCALE_FACTOR-}" ]]; then
|
|
echo "Applying scale factor: ${AVALONIA_GLOBAL_SCALE_FACTOR}" >&2
|
|
export AVALONIA_GLOBAL_SCALE_FACTOR
|
|
fi
|