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
+10 -6
View File
@@ -1,10 +1,15 @@
# ---------------------------------------------------------------------------
# Hyprland compositor package list for setup/hypr/setup.sh
#
# Wayland compositor, screenshot tool and supporting utilities. The desktop
# shell (bar, launcher, notifications, lock screen, wallpaper, idle, session
# menu) on this branch is Caelestia (see hypr/.config/hypr/hyprland.lua:
# `caelestia shell -d`). Noctalia lives on main.
# Wayland compositor, screenshot tool and supporting utilities. Both desktop
# shell frontends are installed: Noctalia and Caelestia. Select the one started
# by Hyprland in hypr/.config/hypr/env.lua.
#
# Caelestia requires the upstream `quickshell-git` build. The explicit
# `aur/` source prefix below is intentional: yay's --aur mode alone can still
# select a repository provider. Do not substitute `noctalia-qs`; although it
# provides `quickshell-git`, that fork is incompatible with Caelestia's
# Quickshell pragmas.
#
# - Lines starting with '#' and blank lines are ignored.
# - Use "@pacman", "@aur" or "@npm" markers to switch section.
@@ -21,7 +26,6 @@ wev
wl-clipboard
hyprshot
brightnessctl
quickshell
noctalia
wtype
@@ -29,6 +33,6 @@ wtype
hyprmod
caelestia-shell
caelestia-cli
quickshell-git
aur/quickshell-git
hyprsaver
python-terminaltexteffects
+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."
+3 -1
View File
@@ -68,7 +68,9 @@ install_aur_pkgs() {
local -n _pkgs="$1"
if ((${#_pkgs[@]})); then
log "Installiere AUR-Pakete: ${_pkgs[*]}"
yay -S --needed "${_pkgs[@]}"
# --aur selects yay's AUR mode. For names that a repository package
# can also provide, use an explicit aur/<package> target in the list.
yay -S --aur --needed "${_pkgs[@]}"
fi
}