Skip to content

fix: 3 Arch-related script fixes (Waydroid, MyBash pkg mgr, GRUB auto-refresh)#1294

Open
thepinak503 wants to merge 7 commits into
ChrisTitusTech:mainfrom
thepinak503:arch-three-fixes
Open

fix: 3 Arch-related script fixes (Waydroid, MyBash pkg mgr, GRUB auto-refresh)#1294
thepinak503 wants to merge 7 commits into
ChrisTitusTech:mainfrom
thepinak503:arch-three-fixes

Conversation

@thepinak503

Copy link
Copy Markdown
Contributor

Summary

Three independent fixes for Arch Linux user scripts.

#1067 — Waydroid grep syntax

Simplified the kernel detection grep in waydroid-setup.sh. Old ERE pattern used (|...) alternation with empty match — fragile and confusing. Replaced with simple piped greps: grep '^linux' | grep -v '-headers' | grep -v '-firmware'.

#1255 — MyBash: install starship/fzf/zoxide via package manager

mybash-setup.sh now tries the system package manager first for starship, fzf, and zoxide. Falls back to curl/git only if the package manager fails. Added a shared _install_pkg helper matching the pattern used by installDepend.

#1220 — GRUB theme auto-refresh

grub-theme.sh now runs grub-mkconfig -o /boot/grub/grub.cfg (or grub2-mkconfig for Fedora/RHEL) after installing the theme, so users don't have to manually refresh.

Security

  • All changes use existing "$ESCALATION_TOOL" pattern
  • Package manager + fallback preserves original behavior
  • No new network calls or unsafe operations

Closes #1067
Closes #1255
Closes #1220

- ChrisTitusTech#1067: Simplify waydroid kernel grep to avoid ERE syntax issues
- ChrisTitusTech#1255: Use package manager for starship/fzf/zoxide before curl fallback
- ChrisTitusTech#1220: Auto-run grub-mkconfig after GRUB theme installation

Closes ChrisTitusTech#1067, ChrisTitusTech#1255, ChrisTitusTech#1220

@technicks89 technicks89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few of the tools here would make sense to have available for all Distros. Updating to support other distros (apt-get/nala, dnf, zypper, etc). move to system-setup root instead of arch folder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zram-generator is available for other distros. Makes sense to add them to this and move this outside the arch folder. I think this makes more sense in the utilities folder. @Abs313a @koibtw Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipewire is available on most distros and this should also be updated and moved into system-setup root folder

@thepinak503

Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @technicks89:

  • pipewire-setup.sh: Added cross-distro package manager support (pacman, apt/nala, dnf, zypper, apk, xbps, eopkg) and moved from arch/ to system-setup/ root so it's available to all distros.
  • zram-setup.sh: Same treatment — cross-distro case $PACKAGER block (uses systemd-zram-generator on Debian/Ubuntu, zram-generator elsewhere) and moved to root.
  • tab_data.toml: Entries moved from the Arch section to root-level [[data]] entries so they show up for all distros.

Kept pacman-config.sh, snapshot-setup.sh, and system-maintenance.sh in arch/ since they use Arch-specific commands/paths (pacman.conf/makepkg.conf, paccache, snap-pac/grub-btrfs).

pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$1" ;;
apk) "$ESCALATION_TOOL" "$PACKAGER" add "$1" ;;
xbps-install) "$ESCALATION_TOOL" "$PACKAGER" -Sy "$1" ;;
*) "$ESCALATION_TOOL" "$PACKAGER" install -y "$1" ;;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend change *) to dnf|apt-get|nala|zypper, and using * for flatpak(if available) or note of unsupported package manager

Comment on lines +30 to +31
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y pipewire wireplumber

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend change *) to flatpak(if available) or note of unsupported package manager

Comment thread core/tabs/system-setup/zram-setup.sh Outdated
Comment on lines +29 to +30
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y zram-generator

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend change *) to flatpak(if available) or note of unsupported package manager

@thepinak503

Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @technicks89's second review:

  • mybash-setup.sh: Changed _install_pkg *) fallback to explicitly list dnf|apt-get|nala|zypper|eopkg for install -y, with *) now returning 1 (triggering the existing curl/git fallback) instead of blindly running an unknown package manager.
  • pipewire-setup.sh & zram-setup.sh: Replaced the *) catch-all that blindly ran $PACKAGER install -y with an explicit unsupported message + exit, since all known package managers are already handled in specific branches.

"$ESCALATION_TOOL" "$PACKAGER" install -y pipewire pipewire-pulse wireplumber
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y pipewire pipewire-pulse wireplumber pipewire-jack-audio-connection-kit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipewire-pulse should be pipewire-pulseaudio

Comment on lines +12 to +13
"$ESCALATION_TOOL" "$PACKAGER" install -y pipewire pipewire-pulse wireplumber pipewire-audio-client-libraries 2>/dev/null || \
"$ESCALATION_TOOL" "$PACKAGER" install -y pipewire pipewire-pulse wireplumber

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian (at least 13) has pipewire-jack as well

@thepinak503

thepinak503 commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

Updated pipewire-setup.sh based on feedback:

  • Debian (apt-get/nala): Added pipewire-jack to the install list. Debian 13 (Trixie) ships i "$ESCALATION_TOOL" "$PACKAGER" install -y pipewire pipewire-pulse wireplumber pipewire-jack-audio-connection-kitt as a separate package. It makes sense to include it. The 2>/dev/null || fallback handles older releases gracefully.
  • Fedora (dnf): Fixed package name from pipewire-pulse to pipewire-pulseaudio. It is the correct Fedora package name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants