fix(install): bake dconf, seed main, name ISO, display modes (#123–#126)
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
Batch of existing-bug fixes from Acer/XPS install findings: - #123: HM pre-activate creates /run/user/$UID and prefers dbus-run-session so dconf no longer aborts the desktop bake - #124: main-built ISOs seed ?ref=main; patch-template rewrites inputs.nomarchy.url from NOMARCHY_FLAKE_URL (was set but unused) - #125: image.baseName → nomarchy-live-….iso (not nixos-live-…) - #126: Display mode list sorted by pixel area; toast shows hyprctl size; TESTING notes QEMU fixed-window scaling illusion Verified: V0 flake check, installer-safety, baseName eval, patch-template flakeUrl rewrite, mode-sort fixture.
This commit is contained in:
@@ -643,26 +643,38 @@ ${themeRows}
|
||||
fi
|
||||
[ -n "$name" ] || exit 0
|
||||
|
||||
# Pick a mode: a few Hyprland resolution tokens, then the output's
|
||||
# advertised modes (rounded refresh rate, deduped, highest first). The
|
||||
# prompt shows the current mode.
|
||||
# Pick a mode: Hyprland tokens, then advertised modes sorted by
|
||||
# pixel area (highest first). Do NOT use sort -rV on "WxH@R" —
|
||||
# version sort is not geometric and mis-orders common modes (#126).
|
||||
cur=$(printf '%s' "$mons" | jq -r --arg n "$name" \
|
||||
'.[]|select(.name==$n)|"\(.width)x\(.height)@\(.refreshRate|round)"')
|
||||
mode=$( {
|
||||
printf 'preferred\nhighres\nhighrr\n'
|
||||
printf '%s' "$mons" | jq -r --arg n "$name" '.[]|select(.name==$n)|.availableModes[]' \
|
||||
| sed 's/Hz$//' | awk -F@ '{ printf "%s@%d\n", $1, $2 + 0.5 }' | sort -rV -u
|
||||
| sed 's/Hz$//' \
|
||||
| awk -F'[@x]' '
|
||||
NF >= 2 {
|
||||
w=$1+0; h=$2+0; r=($3==""?0:$3+0);
|
||||
printf "%d\t%dx%d@%d\n", w*h, w, h, r
|
||||
}' \
|
||||
| sort -t$'\t' -k1,1nr -k2,2 \
|
||||
| cut -f2- \
|
||||
| awk 'NF && !seen[$0]++'
|
||||
printf '%s\n' "$BACK"
|
||||
} | rofi_menu -p "$name (now $cur)" ) || exit 0
|
||||
[ "$mode" = "$BACK" ] && exec "$0" "$modeBack"
|
||||
[ -n "$mode" ] || exit 0
|
||||
|
||||
# Apply live (keep the output's current position + scale), then persist.
|
||||
# Notify with hyprctl-reported size so a QEMU fixed window that
|
||||
# *looks* smaller at higher modes is not mistaken for an invert (#126).
|
||||
pos=$(printf '%s' "$mons" | jq -r --arg n "$name" '.[]|select(.name==$n)|"\(.x)x\(.y)"')
|
||||
scale=$(printf '%s' "$mons" | jq -r --arg n "$name" '.[]|select(.name==$n)|.scale')
|
||||
if hyprctl keyword monitor "$name,$mode,$pos,$scale" >/dev/null 2>&1; then
|
||||
nomarchy-theme-sync --quiet set "settings.monitors.$name" "$mode" --no-switch
|
||||
notify-send "Display" "$name → $mode"
|
||||
got=$(hyprctl monitors -j | jq -r --arg n "$name" \
|
||||
'.[]|select(.name==$n)|"\(.width)x\(.height)@\(.refreshRate|round)"')
|
||||
notify-send "Display" "$name → $mode (now ${got:-?})"
|
||||
else
|
||||
notify-send "Display" "Could not set $name to $mode."
|
||||
fi ;;
|
||||
|
||||
Reference in New Issue
Block a user