2020-10-14 12:16:36 +00:00
|
|
|
which pacman >/dev/null || return 0
|
2020-10-12 20:20:06 +00:00
|
|
|
|
2020-11-30 21:13:43 +00:00
|
|
|
alias dragon='dragon-drag-and-drop'
|
|
|
|
|
2020-10-12 20:20:06 +00:00
|
|
|
# Arch aliases
|
2020-11-14 01:26:30 +00:00
|
|
|
alias pac='noglob sudo pacman'
|
2020-10-12 20:20:06 +00:00
|
|
|
alias pacs='pac -Syu --needed'
|
|
|
|
alias pacr='pac -R'
|
2020-11-14 01:26:30 +00:00
|
|
|
alias yays='noglob yay -S --needed'
|
|
|
|
alias yayr='noglob yay -R'
|
|
|
|
|
|
|
|
yzf() {
|
|
|
|
query=$(test "$1" = "Q" && echo " -l")
|
|
|
|
pos=$(test "$query" && echo 1 || echo 2)
|
|
|
|
yay --color always -$1$2 | sed "s/ /\t/g" | fzf --history=/var/tmp/fzf-history-yay --preview "echo {} | cut -f$pos | xargs yay --color always -$1 -i $query" | cut -f$pos
|
|
|
|
}
|
2020-10-23 12:00:41 +00:00
|
|
|
yas() {
|
2020-11-14 01:26:30 +00:00
|
|
|
pkg=$(yzf S l)
|
2020-10-23 12:00:41 +00:00
|
|
|
test "$pkg" && echo "Install $pkg..." && yay -S "$pkg"
|
|
|
|
}
|
2020-11-14 01:26:30 +00:00
|
|
|
yar() {
|
|
|
|
pkg=$(yzf Q)
|
|
|
|
test "$pkg" && echo "Removing $pkg..." && yay -R "$pkg"
|
|
|
|
}
|
2020-10-12 20:20:06 +00:00
|
|
|
|