-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.aliases
More file actions
154 lines (116 loc) · 5.17 KB
/
Copy path.aliases
File metadata and controls
154 lines (116 loc) · 5.17 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
alias reload "source ~/.config/fish/config.fish | echo "Reloaded!" "
## get top process eating memory
alias psmem='ps aux | sort -nr -k 4 | head -10'
## get top process eating cpu ##
alias pscpu='ps -er -o pid,pcpu,comm | head -10'
alias stats='top -l 1 | grep -E "^CPU|^Phys"'
alias als='alias | grep'
# confirm before overwriting something
alias mkdir="mkdir -p"
alias cp="cp -i"
alias mv='mv -i'
alias rm='rm -i'
alias df='df -h'
alias ptp='ping 192.168.0.1'
alias px='ping 192.168.10.1'
alias pm='ping 192.168.101.1'
alias p8='ping 8.8.8.8'
alias trg='traceroute google.com'
# apps
alias v="nvim"
alias n="nvim"
alias vi="vim"
alias vim="nvim"
alias v!='nvim -u NONE'
alias wt="webtorrent"
alias r="ranger"
alias a="aria2c"
alias wlp="unsplash-wallpaper -r --width 2880 --height 1800"
alias ytdl="youtube-dl "
alias yt2m4="youtube-dl --extract-audio --audio-format m4a "
alias yt2mp3='youtube-dl -l -x --audio-format=mp3 -w -c '
# tmux
alias t="tmux"
alias ta="t a -t"
alias tl="t ls"
alias tn="t new -t"
alias tk="t kill-server"
alias tkall="tmux list-sessions | grep -v attached | cut -d: -f1 | xargs -t -n1 tmux kill-session -t"
# Replace legacy tools with new ones
alias ls='exa -G --color auto --icons -a -s type'
alias ll='exa -alhF --group-directories-first --time-style=long-iso'
# alias llex='ll --git-ignore --ignore-glob=".git|node_modules"' tr2='llex -T -L=2' tr3='llex -T -L=3'
# alias cd="cd && ls -G"
# Colorized cat.
alias cat='bat -pp'
# Common quality of life aliases
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias cc="clear"
alias ht="htop"
alias htu="htop -t -u void"
# brew
alias bri="brew install"
alias bru="brew uninstall"
alias brs="brew search"
alias brsl="brew services list"
alias brsp="brew services stop"
alias brsr="brew services restart"
alias brss="brew services start"
alias brci="brew cask install"
alias brcu="brew cask uninstall"
alias brcs="brew cask search"
alias brewup='brew update && brew upgrade && brew cask upgrade'
# docker
alias dk="docker"
alias dksa="docker stop (docker ps -a -q)"
alias dkda="docker rm (docker ps -a -q)"
alias dkdv="docker volume rm (docker volume ls -q)"
alias dkst="docker stats --format 'table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}'"
alias dkc="docker-compose"
alias dke="docker exec -it"
alias dkm="docker-machine"
#git
alias gct='cat ~/dotfiles/commit-types'
alias commit="/Users/void/validate-commit.py"
# alias fzf='fzf --preview'
alias alf='find /System/Library/CoreServices /System/Applications /Applications /System/Applications/Utilities -maxdepth 1 -name "*.app" | fzf | xargs -I {} open "{}"'
alias rg='rg --hidden -g "!.git" -g "!node_modules" --max-columns 200'
alias findF="ps -ef | grep -v grep | grep "
alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -"
# Get External IP / Internet Speed
alias myip="curl https://ipinfo.io/json" # or /ip for plain-text ip
# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g;'
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
# Lock the screen (when going AFK)
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
alias rebuild_open_with_index="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user; killall Finder"
alias rebuild_spotlight_index="sudo mdutil -i on /"
alias rebuild_indices="rebuild_open_with_index && rebuild_spotlight_index"
alias rbi="rebuild_indices"
alias kr 'kitty @ set-colors -a "~/.config/kitty/colors/rigel.conf"'
alias kd 'kitty @ set-colors -a "~/.config/kitty/colors/gruvbox-dark.conf"'
alias kl 'kitty @ set-colors -a "~/.config/kitty/colors/gruvbox-light.conf"'
alias kpl 'kitty @ set-colors -a "~/.config/kitty/colors/palenight.conf"'
# alias fonts = 'kitty + list-fonts --psnames'
abbr dl "cd ~/Downloads/"
abbr g 'git'
abbr d 'dots'
abbr ks 'kitty --session kitty-session.kitty'
abbr sk 'kitty @ ls > kitty-dump.json | cat kitty-dump.json | python3 ./kitty-convert-dump.py > kitty-session.kitty'
abbr stg 'git st'
abbr gist 'pbpaste | gh gist create | rg github | pbcopy'
# abbr vsc "nvim +call feedkeys(':SLoad dotfiles') +call feedkeys('\<cr>')"
# alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
# alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
# alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'"
# bare git repo alias for dotfiles
alias dots="/usr/local/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME"
alias dotfiles="/usr/local/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME"
# vim: foldmethod=marker:sw=2:foldlevel=10