Separate installing packages from AUR
This commit is contained in:
parent
1d915c6583
commit
00cc8315a6
@ -176,8 +176,9 @@ show_setup_config_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show_install_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 ;;
|
*Package*) terminal omarchy-pkg-install ;;
|
||||||
|
*AUR*) terminal omarchy-pkg-aur-install ;;
|
||||||
*Web*) present_terminal omarchy-webapp-install ;;
|
*Web*) present_terminal omarchy-webapp-install ;;
|
||||||
*TUI*) present_terminal omarchy-tui-install ;;
|
*TUI*) present_terminal omarchy-tui-install ;;
|
||||||
*Service*) show_install_service_menu ;;
|
*Service*) show_install_service_menu ;;
|
||||||
|
24
bin/omarchy-pkg-aur-install
Executable file
24
bin/omarchy-pkg-aur-install
Executable 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
|
@ -14,11 +14,11 @@ fzf_args=(
|
|||||||
--color 'pointer:green,marker:green'
|
--color 'pointer:green,marker:green'
|
||||||
)
|
)
|
||||||
|
|
||||||
pkg_names=$(yay -Slq | fzf "${fzf_args[@]}")
|
pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
|
||||||
|
|
||||||
if [[ -n "$pkg_names" ]]; then
|
if [[ -n "$pkg_names" ]]; then
|
||||||
# Convert newline-separated selections to space-separated for yay
|
# 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
|
sudo updatedb
|
||||||
omarchy-show-done
|
omarchy-show-done
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user