Compare commits

...

2 Commits

Author SHA1 Message Date
a76f1f3af7 fix: theme application hängt nicht mehr auf frischer Installation
apply_theme() rief hyprctl (keyword + hyprpaper) und restart_waybar
ohne zu prüfen ob Hyprland läuft → hyprctl hing bis Timeout im TTY.

Fix: pgrep -x Hyprland guard vor allen hyprctl/waybar-Aufrufen.
apply_theme schreibt jetzt Config-Files (gelten beim nächsten Login),
überspringt aber Display-abhängige Kommandos.
2026-05-27 23:02:00 +02:00
06a21fb8c2 fix: paru-bin (pre-compiled) statt paru aus Source bauen
Alter Code:
- paru aus Source (braucht rustup + rust compiler → langsam + Fehleranfällig)
- 2>/dev/null + 2>&1 | tail -5 versteckte ALLE Fehler
- makepkg als root ausgeführt → schlägt fehl (makepkg verweigert root)
- yay als zweiter Versuch hatte die selben Probleme

Neuer Code:
- paru-bin (pre-compiled binary, kein Rust nötig)
- KEINE stderr-Unterdrückung mehr → Fehler sichtbar
- is_root()-Check: klare Warnung + Anleitung falls als root ausgeführt
- yay-bin als Fallback falls paru-bin scheitert
2026-05-27 22:53:36 +02:00
3 changed files with 38 additions and 22 deletions

View File

@@ -1104,7 +1104,7 @@ EOF
return return
fi fi
if command -v hyprctl >/dev/null 2>&1; then if command -v hyprctl >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
if ! pgrep -x hyprpaper >/dev/null 2>&1; then if ! pgrep -x hyprpaper >/dev/null 2>&1; then
start_detached hyprpaper start_detached hyprpaper
sleep 0.2 sleep 0.2
@@ -1134,7 +1134,7 @@ EOF
write_sddm_theme_assets write_sddm_theme_assets
apply_wallpaper apply_wallpaper
if command -v hyprctl >/dev/null 2>&1; then if command -v hyprctl >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
hyprctl keyword general:col.active_border "$ACTIVE_BORDER" >/dev/null || true hyprctl keyword general:col.active_border "$ACTIVE_BORDER" >/dev/null || true
hyprctl keyword general:col.inactive_border "$INACTIVE_BORDER" >/dev/null || true hyprctl keyword general:col.inactive_border "$INACTIVE_BORDER" >/dev/null || true
fi fi
@@ -1143,7 +1143,7 @@ EOF
swaync-client -rs >/dev/null 2>&1 || true swaync-client -rs >/dev/null 2>&1 || true
fi fi
if command -v waybar >/dev/null 2>&1; then if command -v waybar >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
restart_waybar restart_waybar
fi fi

View File

@@ -267,29 +267,48 @@ install_aur_helper() {
return 0 return 0
fi fi
if ! command -v git >/dev/null 2>&1; then if is_root; then
sudo_run pacman -S --needed --noconfirm git base-devel tui_warn "Running as root — makepkg refuses to run as root."
tui_info "Switch to a normal user with sudo access and re-run, or install paru manually:"
tui_info " pacman -S --needed git && git clone https://aur.archlinux.org/paru-bin.git"
tui_info " cd paru-bin && makepkg -si"
return 1
fi fi
command -v git >/dev/null 2>&1 || sudo_run pacman -S --needed --noconfirm git
local build_dir local build_dir
build_dir="$(mktemp -d)" build_dir="$(mktemp -d)"
sudo_run pacman -S --needed --noconfirm rustup 2>/dev/null || true tui_info "Downloading paru-bin from AUR..."
if ! git clone https://aur.archlinux.org/paru-bin.git "$build_dir/paru-bin"; then
if have rustup; then tui_error "Failed to download paru-bin. Check network connectivity."
rustup default stable >/dev/null 2>&1 || true
fi
if git clone https://aur.archlinux.org/paru.git "$build_dir/paru" 2>/dev/null; then
(cd "$build_dir/paru" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "paru build failed, trying yay..."
if git clone https://aur.archlinux.org/yay.git "$build_dir/yay" 2>/dev/null; then
(cd "$build_dir/yay" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "yay build failed too. Install manually: paru -S paru-bin"
}
fi
}
fi
rm -rf "$build_dir" rm -rf "$build_dir"
return 1
fi
tui_info "Building paru-bin with makepkg..."
if (cd "$build_dir/paru-bin" && makepkg -si --needed --noconfirm); then
tui_success "paru installed successfully"
rm -rf "$build_dir"
return 0
fi
local rc=$?
tui_warn "makepkg failed (exit $rc). Trying yay-bin..."
rm -rf "$build_dir/paru-bin"
if git clone https://aur.archlinux.org/yay-bin.git "$build_dir/yay-bin"; then
if (cd "$build_dir/yay-bin" && makepkg -si --needed --noconfirm); then
tui_success "yay installed successfully"
rm -rf "$build_dir"
return 0
fi
fi
tui_warn "Could not install AUR helper. Install manually:"
tui_info " cd /tmp && git clone https://aur.archlinux.org/paru-bin.git"
tui_info " cd paru-bin && makepkg -si"
rm -rf "$build_dir"
return 1
} }

View File

@@ -8,10 +8,7 @@ module_required() { return 1; }
module_should_skip() { return 1; } module_should_skip() { return 1; }
module_prereqs() { module_prereqs() {
if ! have hyprctl && ! have notify-send; then
log_warn "Neither hyprctl nor notify-send found. Theme can still be applied later."
return 0 return 0
fi
} }
module_main() { module_main() {