Compare commits
2 Commits
5c6c0f3fed
...
a76f1f3af7
| Author | SHA1 | Date | |
|---|---|---|---|
| a76f1f3af7 | |||
| 06a21fb8c2 |
@@ -1104,7 +1104,7 @@ EOF
|
||||
return
|
||||
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
|
||||
start_detached hyprpaper
|
||||
sleep 0.2
|
||||
@@ -1134,7 +1134,7 @@ EOF
|
||||
write_sddm_theme_assets
|
||||
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.inactive_border "$INACTIVE_BORDER" >/dev/null || true
|
||||
fi
|
||||
@@ -1143,7 +1143,7 @@ EOF
|
||||
swaync-client -rs >/dev/null 2>&1 || true
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
49
lib/utils.sh
49
lib/utils.sh
@@ -267,29 +267,48 @@ install_aur_helper() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! command -v git >/dev/null 2>&1; then
|
||||
sudo_run pacman -S --needed --noconfirm git base-devel
|
||||
if is_root; then
|
||||
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
|
||||
|
||||
command -v git >/dev/null 2>&1 || sudo_run pacman -S --needed --noconfirm git
|
||||
|
||||
local build_dir
|
||||
build_dir="$(mktemp -d)"
|
||||
|
||||
sudo_run pacman -S --needed --noconfirm rustup 2>/dev/null || true
|
||||
|
||||
if have rustup; then
|
||||
rustup default stable >/dev/null 2>&1 || true
|
||||
tui_info "Downloading paru-bin from AUR..."
|
||||
if ! git clone https://aur.archlinux.org/paru-bin.git "$build_dir/paru-bin"; then
|
||||
tui_error "Failed to download paru-bin. Check network connectivity."
|
||||
rm -rf "$build_dir"
|
||||
return 1
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@@ -8,10 +8,7 @@ module_required() { return 1; }
|
||||
module_should_skip() { return 1; }
|
||||
|
||||
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
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
module_main() {
|
||||
|
||||
Reference in New Issue
Block a user