updated some more stuffz
This commit is contained in:
parent
e82d318c3d
commit
42b7fc8d26
9 changed files with 161 additions and 91 deletions
|
@ -30,7 +30,7 @@ manpath+=(${brewpr}/share/man)
|
|||
infopath+=(${brewpr}/share/info)
|
||||
|
||||
# XDG Data Dirs
|
||||
XDG_DATA_DIRS+=(/home/linuxbrew/.linuxbrew/share)
|
||||
XDG_DATA_DIRS+=(${brewpr}/share)
|
||||
|
||||
# Editor Setting
|
||||
EDITOR='nano'
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
function ad() {
|
||||
|
||||
if [[ "$@" == */ ]]; then
|
||||
mkdir -p $@
|
||||
else
|
||||
for f in "$@"; do
|
||||
mkdir -p "$(dirname "$f")"
|
||||
done
|
||||
touch "$@"
|
||||
fi
|
||||
}
|
|
@ -1,5 +1,32 @@
|
|||
# Aliases for OS
|
||||
if type pacman &>/dev/null; then
|
||||
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
|
||||
|
||||
if (( $+commands[yaourt] )); then
|
||||
alias yaconf='yaourt -C'
|
||||
alias yaupg='yaourt -Syua'
|
||||
|
@ -16,8 +43,36 @@ if type pacman &>/dev/null; then
|
|||
alias yaorph='yaourt -Qtd'
|
||||
alias yainsd='yaourt -S --asdeps'
|
||||
alias yamir='yaourt -Syy'
|
||||
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias yaupd='yaourt -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias yaupd='yaourt -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias yaupd='yaourt -Sy && sudo aur'
|
||||
else
|
||||
alias yaupd='yaourt -Sy'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+commands[trizen] )); then
|
||||
function upgrade() {
|
||||
trizen -Syu
|
||||
}
|
||||
elif (( $+commands[pacaur] )); then
|
||||
function upgrade() {
|
||||
pacaur -Syu
|
||||
}
|
||||
elif (( $+commands[yaourt] )); then
|
||||
function upgrade() {
|
||||
yaourt -Syu
|
||||
}
|
||||
else
|
||||
function upgrade() {
|
||||
sudo pacman -Syu
|
||||
}
|
||||
fi
|
||||
|
||||
alias pacupg='sudo pacman -Syu'
|
||||
alias pacin='sudo pacman -S'
|
||||
|
@ -33,15 +88,28 @@ if type pacman &>/dev/null; then
|
|||
alias paclsorphans='sudo pacman -Qdt'
|
||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
||||
alias pacfileupg='sudo pacman -Fy'
|
||||
alias pacfiles='pacman tFs'
|
||||
alias pacupd='sudo pacman -Sy'
|
||||
alias pacfiles='pacman -Fs'
|
||||
alias pacls='pacman -Ql'
|
||||
alias pacown='pacman -Qo'
|
||||
|
||||
paclist() {
|
||||
|
||||
if (( $+commands[abs] && $+commands[aur] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'
|
||||
elif (( $+commands[abs] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo abs'
|
||||
elif (( $+commands[aur] )); then
|
||||
alias pacupd='sudo pacman -Sy && sudo aur'
|
||||
else
|
||||
alias pacupd='sudo pacman -Sy'
|
||||
fi
|
||||
|
||||
function paclist() {
|
||||
# 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}'
|
||||
}
|
||||
|
||||
pacdisowned() {
|
||||
function pacdisowned() {
|
||||
emulate -L zsh
|
||||
|
||||
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
|
||||
|
@ -53,23 +121,38 @@ if type pacman &>/dev/null; then
|
|||
|
||||
pacman -Qlq | sort -u > "$db"
|
||||
|
||||
find /bin /etc /lib /sbin /usr ! -name lost+found \( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
||||
find /bin /etc /lib /sbin /usr ! -name lost+found \
|
||||
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
||||
|
||||
comm -23 "$fs" "$db"
|
||||
}
|
||||
|
||||
pacmanallkeys() {
|
||||
function pacmanallkeys() {
|
||||
emulate -L zsh
|
||||
curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \
|
||||
awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | xargs sudo pacman-key --recv-keys
|
||||
awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \
|
||||
xargs sudo pacman-key --recv-keys
|
||||
}
|
||||
|
||||
pacmansignkeys() {
|
||||
function pacmansignkeys() {
|
||||
emulate -L zsh
|
||||
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
|
||||
printf 'trust\n3\n' | sudo gpg --homedir /etc/pacman.d/gnupg \
|
||||
--no-permission-warning --command-fd 0 --edit-key $key
|
||||
done
|
||||
}
|
||||
|
||||
if (( $+commands[xdg-open] )); then
|
||||
function pacweb() {
|
||||
pkg="$1"
|
||||
infos="$(pacman -Si "$pkg")"
|
||||
if [[ -z "$infos" ]]; then
|
||||
return
|
||||
fi
|
||||
repo="$(grep '^Repo' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||
arch="$(grep '^Arch' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||
xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null
|
||||
}
|
||||
fi
|
||||
|
|
|
@ -2,8 +2,6 @@ alias rm='rm -i'
|
|||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
alias la='ls -lAh'
|
||||
alias psg='ps aux | grep -v grep | grep'
|
||||
clearall () { clear; printf '\033[3J' }
|
||||
|
||||
for file in ${dotcfg}/zsh/cfg.d/source.d/*.zsh; do
|
||||
source $file
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 70a7a5cdee168b6cb9400cccbe48427906b6ca28
|
||||
Subproject commit 1a71e0a1a36117722c02736487e6940e72455e0b
|
|
@ -1 +1 @@
|
|||
Subproject commit fe9ca6f5ede35d16f28e0c5db781fb39437fd171
|
||||
Subproject commit 2f4cc0d9cb70235e7c5820dc4e7dd89b1d375fb5
|
|
@ -1 +1 @@
|
|||
Subproject commit 5ec6269c94d3b0c9ff5a7f87c890d067138bc58f
|
||||
Subproject commit 4b37ac26ffaee3e6566723ea187202d1e44ebb52
|
2
lib/has
2
lib/has
|
@ -1 +1 @@
|
|||
Subproject commit a3223b2a8ef25679ecaaa5a963493260b64442cb
|
||||
Subproject commit 5443d4cb9e03d8d97fa0be19a4718958bf23fca4
|
|
@ -1 +1 @@
|
|||
Subproject commit 0cec4626219bfd5a163986ebe3745fc31b593446
|
||||
Subproject commit 9cd3701ac0297f4bdf9673ea0dffa8ffdaea63e8
|
Loading…
Add table
Reference in a new issue