mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-04 21:28:21 -05:00
19 lines
371 B
Plaintext
19 lines
371 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
if [ -z "$1" ]
|
||
|
then
|
||
|
echo "Usage:
|
||
|
-i : install a package
|
||
|
-u : uninstall a package"
|
||
|
else
|
||
|
if [ "$1" = "-i" ]
|
||
|
then
|
||
|
yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S
|
||
|
elif [ "$1" = "-u" ]
|
||
|
then
|
||
|
yay -Qq | fzf --multi --preview 'cat <(yay -Si {1}) <(yay -Fl {1} | awk "{print \$2}")' | xargs -ro yay -Rns
|
||
|
else
|
||
|
exit 1
|
||
|
fi
|
||
|
fi
|