-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
57 lines (48 loc) · 2.32 KB
/
.aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Quick edit `rc` files
alias zshrc="vim ~/.zshrc"
alias vimrc="vim ~/.config/nvim/init.vim"
command -v bat &> /dev/null && alias c='bat -p' || alias c='cat'
command -v ranger &> /dev/null && alias r='ranger'
command -v fd &> /dev/null && alias fd='fd --hidden --follow' || alias fd='find . -name'
command -v rg &> /dev/null && alias rg='rg --hidden --follow --smart-case 2>/dev/null' || alias rg='grep --color=auto --exclude-dir=.git -R'
command -v exa &> /dev/null && alias ls='exa --group --git --group-directories-first' || alias ls='ls --color=auto --group-directories-first -h'
command -v exa &> /dev/null && alias la='ll -a' || alias la='ll -A'
command -v exa &> /dev/null && alias lk='ll -s=size' || alias lk='ll -r --sort=size'
command -v exa &> /dev/null && alias lm='ll -s=modified' || alias lm='ll -r --sort=time'
command -v kitty &> /dev/null && alias ssh='kitty +kitten ssh'
command -v zoxide &> /dev/null && alias cd='z'
command -v aria2c &> /dev/null && alias a2c='aria2c'
command -v youtube-dl &> /dev/null && alias y='youtube-dl'
alias ~="cd ~"
alias -- -="cd -"
alias e="$EDITOR"
alias d='dig +nocmd +nomultiline +noall +answer'
alias cp='cp -r --reflink=auto'
alias mkdir='mkdir -p'
alias http-serve='python -m http.server'
alias locate='locate -i'
alias o='xdg-open'
alias rm!='\rm -rf'
alias tree='tree -a -I .git --dirsfirst'
alias ll='ls -l'
alias sub="filebot -get-subtitles"
alias reload="exec $SHELL -l"
alias tlmgr="/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode"
function md() { [[ $# == 1 ]] && mkdir -p -- "$1" && cd -- "$1" }
compdef _directories md
p() { ping "${1:-1.1.1.1}" }
tmpd() { cd "$(mktemp -d -t "${1:-tmp}.XXXXXXXXXX")" }
alias dc='docker-compose'
alias dcu='dc up -d'
alias dcd='dc down'
alias dcs='dc ps'
alias dcl='dc logs -f --tail=1000'
alias dce='dc exec'
eval "$(hub alias -s)"
alias ua-drop-caches='sudo paccache -rk3; yay -Sc --aur --noconfirm'
alias ua-reset-mirror='export TMPFILE="$(mktemp)"; \
sudo true; \
rate-mirrors --save=$TMPFILE arch --max-delay=21600 \
&& sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup \
&& sudo mv $TMPFILE /etc/pacman.d/mirrorlist \
&& ua-drop-caches'