From b65377decf99a4d53583ceb0f277f17af1671267 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sat, 15 Aug 2026 06:20:10 -0400 Subject: Copy.sh wasn't setting LUA as default on new install Signed-off-by: Don Williams On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/lib_copy.sh --- copy.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index 2145e4b7..42ebd7f6 100755 --- a/copy.sh +++ b/copy.sh @@ -257,24 +257,24 @@ version_gte() { # Parse installed Hyprland version (e.g. 0.55.4) from hyprctl/Hyprland. get_hyprland_version() { local ver="" - local raw="" + local full_output="" if command -v hyprctl >/dev/null 2>&1; then - raw="$(hyprctl version 2>/dev/null | head -n1 || true)" + full_output="$(hyprctl version 2>/dev/null || true)" fi - if [ -z "$raw" ] && command -v Hyprland >/dev/null 2>&1; then - raw="$(Hyprland --version 2>/dev/null | head -n1 || true)" + if [ -z "$full_output" ] && command -v Hyprland >/dev/null 2>&1; then + full_output="$(Hyprland --version 2>/dev/null || true)" fi - if [ -z "$raw" ] && command -v hyprland >/dev/null 2>&1; then - raw="$(hyprland --version 2>/dev/null | head -n1 || true)" + if [ -z "$full_output" ] && command -v hyprland >/dev/null 2>&1; then + full_output="$(hyprland --version 2>/dev/null || true)" fi # Prefer Tag: vX.Y.Z when present in full output - if command -v hyprctl >/dev/null 2>&1; then - ver="$(hyprctl version 2>/dev/null | sed -n 's/^Tag: v\([0-9][0-9.]*\).*/\1/p' | head -n1 || true)" - fi - if [ -z "$ver" ] && [ -n "$raw" ]; then - ver="$(printf '%s\n' "$raw" | sed -n 's/.*[Hh]yprland[[:space:]]\+v\?\([0-9][0-9.]*\).*/\1/p' | head -n1)" + ver="$(printf '%s\n' "$full_output" | sed -n 's/^Tag: v\([0-9][0-9.]*\).*/\1/p' | head -n1 || true)" + + # Fallback to matching 'Hyprland v0.X.Y' or 'Hyprland 0.X.Y' anywhere in full output + if [ -z "$ver" ] && [ -n "$full_output" ]; then + ver="$(printf '%s\n' "$full_output" | sed -n 's/.*[Hh]yprland[[:space:]]\+v\?\([0-9][0-9.]*\).*/\1/p' | head -n1 || true)" fi printf '%s' "$ver" -- cgit v1.2.3