hypr fix setup issues

This commit is contained in:
2026-09-25 14:26:30 +02:00
parent 8ec820976f
commit 77f70e318c
12 changed files with 258 additions and 45 deletions
+59
View File
@@ -7,6 +7,62 @@ PACKAGES_FILE="$SETUP_DIR/packages.txt"
# shellcheck source=../lib/common.sh
source "$SETUP_DIR/../lib/common.sh"
# ---------------------------------------------------------------------------
# Create the local shell selection from the tracked example exactly once.
# env.lua is ignored by Git so each machine can keep its own choice.
# ---------------------------------------------------------------------------
ensure_shell_config() {
local config_dir example_file config_file
config_dir="$(repo_root)/hypr/.config/hypr"
example_file="$config_dir/env.example.lua"
config_file="$config_dir/env.lua"
if [[ -e "$config_file" || -L "$config_file" ]]; then
echo "==> Behalte lokale Shell-Auswahl: $config_file"
return
fi
echo "==> Erstelle lokale Shell-Auswahl aus env.example.lua ..."
cp "$example_file" "$config_file"
}
# ---------------------------------------------------------------------------
# Keep Caelestia on upstream Quickshell.
#
# noctalia-qs can satisfy pacman's virtual quickshell-git dependency, but its
# parser is not compatible with Caelestia. The explicit aur/quickshell-git
# target bypasses that provider, then setup verifies that /usr/bin/qs really
# belongs to quickshell-git.
# ---------------------------------------------------------------------------
warn_about_quickshell_provider() {
if pacman -Q noctalia-qs >/dev/null 2>&1; then
log "noctalia-qs ist installiert; die AUR-Transaktion ersetzt es durch quickshell-git."
fi
}
verify_quickshell_runtime() {
local owner
if pacman -Q noctalia-qs >/dev/null 2>&1; then
echo "Fehler: noctalia-qs ist weiterhin installiert; Caelestia benoetigt AUR quickshell-git." >&2
return 1
fi
if ! pacman -Q quickshell-git >/dev/null 2>&1; then
echo "Fehler: AUR-Paket quickshell-git wurde nicht installiert." >&2
return 1
fi
owner="$(pacman -Qoq /usr/bin/qs 2>/dev/null || true)"
if [[ "$owner" != "quickshell-git" ]]; then
echo "Fehler: /usr/bin/qs gehoert zu '$owner' statt zu quickshell-git." >&2
return 1
fi
log "Quickshell-Runtime geprueft: quickshell-git"
}
# ---------------------------------------------------------------------------
# Post-install: run Hyprland environment & desktop integration scripts.
# ---------------------------------------------------------------------------
@@ -30,8 +86,11 @@ main() {
echo "==> Lese Paketliste: $PACKAGES_FILE"
read_packages "$PACKAGES_FILE" pacman_pkgs aur_pkgs npm_pkgs
warn_about_quickshell_provider
install_all_pkgs pacman_pkgs aur_pkgs npm_pkgs
verify_quickshell_runtime
ensure_shell_config
run_hypr_scripts
echo "Fertig. Hyprland und das Compositor-Okosystem sind eingerichtet."