mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
* Add omarchy CLI * Remove outdated or internal * Add bash completions for command * Add omarchy command documentation * Add missing docs * Correct to what's now right * Fix tests --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
27 lines
796 B
Bash
Executable File
27 lines
796 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Show a fuzzy-finder TUI for picking new Arch and OPR packages to install.
|
|
# omarchy:requires-sudo=true
|
|
|
|
fzf_args=(
|
|
--multi
|
|
--preview 'pacman -Sii {1}'
|
|
--preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select'
|
|
--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=$(pacman -Slq | fzf "${fzf_args[@]}")
|
|
|
|
if [[ -n $pkg_names ]]; then
|
|
source omarchy-sudo-keepalive
|
|
|
|
# Convert newline-separated selections to space-separated for pacman
|
|
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm
|
|
omarchy-show-done
|
|
fi
|