2018-04-15 14:47:08 +02:00
|
|
|
if (( $+commands[trizen] )); then
|
|
|
|
alias trconf='trizen -C'
|
|
|
|
alias trupg='trizen -Syua'
|
|
|
|
alias trsu='trizen -Syua --noconfirm'
|
|
|
|
alias trin='trizen -S'
|
|
|
|
alias trins='trizen -U'
|
|
|
|
alias trre='trizen -R'
|
|
|
|
alias trrem='trizen -Rns'
|
|
|
|
alias trrep='trizen -Si'
|
|
|
|
alias trreps='trizen -Ss'
|
|
|
|
alias trloc='trizen -Qi'
|
|
|
|
alias trlocs='trizen -Qs'
|
|
|
|
alias trlst='trizen -Qe'
|
|
|
|
alias trorph='trizen -Qtd'
|
|
|
|
alias trinsd='trizen -S --asdeps'
|
|
|
|
alias trmir='trizen -Syy'
|
|
|
|
|
|
|
|
|
|
|
|
if (( $+commands[abs] && $+commands[aur] )); then
|
|
|
|
alias trupd='trizen -Sy && sudo abs && sudo aur'
|
|
|
|
elif (( $+commands[abs] )); then
|
|
|
|
alias trupd='trizen -Sy && sudo abs'
|
|
|
|
elif (( $+commands[aur] )); then
|
|
|
|
alias trupd='trizen -Sy && sudo aur'
|
|
|
|
else
|
|
|
|
alias trupd='trizen -Sy'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-09-27 08:17:18 +02:00
|
|
|
if (( $+commands[yaourt] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yaconf='yaourt -C'
|
|
|
|
alias yaupg='yaourt -Syua'
|
2016-09-04 19:51:42 +02:00
|
|
|
alias yasu='yaourt -Syua --noconfirm'
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yain='yaourt -S'
|
|
|
|
alias yains='yaourt -U'
|
|
|
|
alias yare='yaourt -R'
|
|
|
|
alias yarem='yaourt -Rns'
|
|
|
|
alias yarep='yaourt -Si'
|
|
|
|
alias yareps='yaourt -Ss'
|
|
|
|
alias yaloc='yaourt -Qi'
|
|
|
|
alias yalocs='yaourt -Qs'
|
|
|
|
alias yalst='yaourt -Qe'
|
|
|
|
alias yaorph='yaourt -Qtd'
|
|
|
|
alias yainsd='yaourt -S --asdeps'
|
|
|
|
alias yamir='yaourt -Syy'
|
|
|
|
|
|
|
|
|
2015-11-01 00:21:26 +01:00
|
|
|
if (( $+commands[abs] && $+commands[aur] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yaupd='yaourt -Sy && sudo abs && sudo aur'
|
2015-11-01 00:21:26 +01:00
|
|
|
elif (( $+commands[abs] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yaupd='yaourt -Sy && sudo abs'
|
2015-11-01 00:21:26 +01:00
|
|
|
elif (( $+commands[aur] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yaupd='yaourt -Sy && sudo aur'
|
2011-07-23 17:22:39 +02:00
|
|
|
else
|
2016-08-24 08:08:55 +02:00
|
|
|
alias yaupd='yaourt -Sy'
|
2011-07-23 17:22:39 +02:00
|
|
|
fi
|
2011-07-17 00:42:09 +02:00
|
|
|
fi
|
|
|
|
|
2016-09-27 08:17:18 +02:00
|
|
|
if (( $+commands[pacaur] )); then
|
2017-11-14 15:35:55 +01:00
|
|
|
alias paupg='pacaur -Syu'
|
|
|
|
alias pasu='pacaur -Syu --noconfirm'
|
2016-09-27 08:17:18 +02:00
|
|
|
alias pain='pacaur -S'
|
|
|
|
alias pains='pacaur -U'
|
|
|
|
alias pare='pacaur -R'
|
|
|
|
alias parem='pacaur -Rns'
|
|
|
|
alias parep='pacaur -Si'
|
|
|
|
alias pareps='pacaur -Ss'
|
|
|
|
alias paloc='pacaur -Qi'
|
|
|
|
alias palocs='pacaur -Qs'
|
|
|
|
alias palst='pacaur -Qe'
|
|
|
|
alias paorph='pacaur -Qtd'
|
|
|
|
alias painsd='pacaur -S --asdeps'
|
|
|
|
alias pamir='pacaur -Syy'
|
|
|
|
|
|
|
|
if (( $+commands[abs] && $+commands[aur] )); then
|
|
|
|
alias paupd='pacaur -Sy && sudo abs && sudo aur'
|
|
|
|
elif (( $+commands[abs] )); then
|
|
|
|
alias paupd='pacaur -Sy && sudo abs'
|
|
|
|
elif (( $+commands[aur] )); then
|
|
|
|
alias paupd='pacaur -Sy && sudo aur'
|
|
|
|
else
|
|
|
|
alias paupd='pacaur -Sy'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-04-15 14:47:08 +02:00
|
|
|
if (( $+commands[trizen] )); then
|
2018-04-15 15:53:43 +02:00
|
|
|
function upgrade() {
|
2018-04-15 14:47:08 +02:00
|
|
|
trizen -Syu
|
|
|
|
}
|
|
|
|
elif (( $+commands[pacaur] )); then
|
2018-04-15 15:53:43 +02:00
|
|
|
function upgrade() {
|
2016-09-27 08:17:18 +02:00
|
|
|
pacaur -Syu
|
|
|
|
}
|
|
|
|
elif (( $+commands[yaourt] )); then
|
2018-04-15 15:53:43 +02:00
|
|
|
function upgrade() {
|
2016-09-27 08:17:18 +02:00
|
|
|
yaourt -Syu
|
|
|
|
}
|
|
|
|
else
|
2018-04-15 15:53:43 +02:00
|
|
|
function upgrade() {
|
2016-10-02 23:28:39 +02:00
|
|
|
sudo pacman -Syu
|
2016-09-27 08:17:18 +02:00
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
2011-07-17 00:42:09 +02:00
|
|
|
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
|
2016-08-24 08:08:55 +02:00
|
|
|
alias pacupg='sudo pacman -Syu'
|
|
|
|
alias pacin='sudo pacman -S'
|
|
|
|
alias pacins='sudo pacman -U'
|
|
|
|
alias pacre='sudo pacman -R'
|
|
|
|
alias pacrem='sudo pacman -Rns'
|
|
|
|
alias pacrep='pacman -Si'
|
|
|
|
alias pacreps='pacman -Ss'
|
|
|
|
alias pacloc='pacman -Qi'
|
|
|
|
alias paclocs='pacman -Qs'
|
|
|
|
alias pacinsd='sudo pacman -S --asdeps'
|
|
|
|
alias pacmir='sudo pacman -Syy'
|
|
|
|
alias paclsorphans='sudo pacman -Qdt'
|
|
|
|
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
2017-02-23 08:52:56 +01:00
|
|
|
alias pacfileupg='sudo pacman -Fy'
|
2018-04-15 13:38:25 +02:00
|
|
|
alias pacfiles='pacman -Fs'
|
2016-08-24 08:08:55 +02:00
|
|
|
|
|
|
|
|
2015-11-01 00:21:26 +01:00
|
|
|
if (( $+commands[abs] && $+commands[aur] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'
|
2015-11-01 00:21:26 +01:00
|
|
|
elif (( $+commands[abs] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias pacupd='sudo pacman -Sy && sudo abs'
|
2015-11-01 00:21:26 +01:00
|
|
|
elif (( $+commands[aur] )); then
|
2016-08-24 08:08:55 +02:00
|
|
|
alias pacupd='sudo pacman -Sy && sudo aur'
|
2011-07-23 17:22:39 +02:00
|
|
|
else
|
2016-08-24 08:08:55 +02:00
|
|
|
alias pacupd='sudo pacman -Sy'
|
2011-07-23 17:22:39 +02:00
|
|
|
fi
|
2011-07-17 00:42:09 +02:00
|
|
|
|
2018-04-15 15:53:43 +02:00
|
|
|
function paclist() {
|
2016-08-24 08:08:55 +02:00
|
|
|
# Source: https://bbs.archlinux.org/viewtopic.php?id=93683
|
|
|
|
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \
|
|
|
|
awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
|
2011-07-17 00:42:09 +02:00
|
|
|
}
|
2011-07-20 04:38:29 +02:00
|
|
|
|
2018-04-15 15:53:43 +02:00
|
|
|
function pacdisowned() {
|
2016-08-24 08:51:06 +02:00
|
|
|
emulate -L zsh
|
|
|
|
|
2011-07-17 00:42:09 +02:00
|
|
|
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
|
|
|
|
db=$tmp/db
|
|
|
|
fs=$tmp/fs
|
|
|
|
|
|
|
|
mkdir "$tmp"
|
|
|
|
trap 'rm -rf "$tmp"' EXIT
|
|
|
|
|
|
|
|
pacman -Qlq | sort -u > "$db"
|
|
|
|
|
2016-08-24 08:08:55 +02:00
|
|
|
find /bin /etc /lib /sbin /usr ! -name lost+found \
|
|
|
|
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
2011-07-17 00:42:09 +02:00
|
|
|
|
|
|
|
comm -23 "$fs" "$db"
|
|
|
|
}
|
2012-12-02 20:55:19 +01:00
|
|
|
|
2018-04-15 15:53:43 +02:00
|
|
|
function pacmanallkeys() {
|
2016-08-24 08:51:06 +02:00
|
|
|
emulate -L zsh
|
|
|
|
curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \
|
2016-08-24 08:08:55 +02:00
|
|
|
awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \
|
|
|
|
xargs sudo pacman-key --recv-keys
|
2012-12-02 20:55:19 +01:00
|
|
|
}
|
|
|
|
|
2018-04-15 15:53:43 +02:00
|
|
|
function pacmansignkeys() {
|
2016-08-24 08:51:06 +02:00
|
|
|
emulate -L zsh
|
2012-12-02 20:55:19 +01:00
|
|
|
for key in $*; do
|
|
|
|
sudo pacman-key --recv-keys $key
|
|
|
|
sudo pacman-key --lsign-key $key
|
|
|
|
printf 'trust\n3\n' | sudo gpg --homedir /etc/pacman.d/gnupg \
|
|
|
|
--no-permission-warning --command-fd 0 --edit-key $key
|
|
|
|
done
|
|
|
|
}
|