diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 86da69f8..173d9834 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -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 ;; diff --git a/bin/omarchy-pkg-aur-install b/bin/omarchy-pkg-aur-install new file mode 100755 index 00000000..25aff21f --- /dev/null +++ b/bin/omarchy-pkg-aur-install @@ -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 diff --git a/bin/omarchy-pkg-install b/bin/omarchy-pkg-install index a933e937..72005cbf 100755 --- a/bin/omarchy-pkg-install +++ b/bin/omarchy-pkg-install @@ -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