Separate installing packages from AUR

This commit is contained in:
David Heinemeier Hansson 2025-08-24 19:15:12 +02:00
parent 1d915c6583
commit 00cc8315a6
3 changed files with 28 additions and 3 deletions

View File

@ -176,8 +176,9 @@ show_setup_config_menu() {
}
show_install_menu() {
case $(menu "Install" "󰣇 Package\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n󱚤 AI\n Gaming") in
case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n󱚤 AI\n Gaming") in
*Package*) terminal omarchy-pkg-install ;;
*AUR*) terminal omarchy-pkg-aur-install ;;
*Web*) present_terminal omarchy-webapp-install ;;
*TUI*) present_terminal omarchy-tui-install ;;
*Service*) show_install_service_menu ;;

24
bin/omarchy-pkg-aur-install Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
set -e
fzf_args=(
--multi
--preview 'yay -Sii {1}'
--preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select, F11: maximize'
--preview-label-pos='bottom'
--preview-window 'down:65%:wrap'
--bind 'alt-p:toggle-preview'
--bind 'alt-d:preview-half-page-down,alt-u:preview-half-page-up'
--bind 'alt-k:preview-up,alt-j:preview-down'
--color 'pointer:green,marker:green'
)
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
if [[ -n "$pkg_names" ]]; then
# Convert newline-separated selections to space-separated for yay
echo "$pkg_names" | tr '\n' ' ' | xargs yay -Sy --noconfirm
sudo updatedb
omarchy-show-done
fi

View File

@ -14,11 +14,11 @@ fzf_args=(
--color 'pointer:green,marker:green'
)
pkg_names=$(yay -Slq | fzf "${fzf_args[@]}")
pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
if [[ -n "$pkg_names" ]]; then
# Convert newline-separated selections to space-separated for yay
echo "$pkg_names" | tr '\n' ' ' | xargs yay -Sy --noconfirm
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Sy --noconfirm
sudo updatedb
omarchy-show-done
fi