-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathaliases.sh
212 lines (203 loc) · 7.27 KB
/
aliases.sh
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#!/bin/bash
# Core
alias ..="cd ../"
alias ...="cd ../../"
alias ....="cd ../../../"
alias .....="cd ../../../../"
alias 7zc="7z a -mx=9"
alias acp="advcp -gv"
alias amv="advmv -gv"
alias cat="bat"
alias cdx='cd $(xplr)'
alias cpa='"$CLIPPASTE"'
alias ccp='"$CLIPCOPY"'
alias cp="cp -irv"
alias diff="diff --color=auto"
alias ez="eza -Ah -s=extension --group-directories-first --icons"
alias ezl="eza -AhlT -L=1 -s=extension --group-directories-first --icons --git --git-ignore"
alias ezr="eza -AhlR -L=2 -s=extension --group-directories-first --icons --git --git-ignore"
alias ezt="eza -ahlT -L=2 -s=extension --group-directories-first --icons --git --git-ignore"
alias fd="fd -H"
alias fdir="find . -type d -name"
alias ffil="find . -type f -name"
alias grep="grep --color=auto"
alias la="ez"
alias ll="ezl"
alias lr="ezr"
alias lt="ezt"
alias ldir="ls -d */"
alias ln="ln -sfnv"
alias logout="sudo pkill -u \$USER"
alias ls='ls --color=auto'
alias lsa="lsd -A --group-dirs first --classify"
alias lso="lsd -A --group-dirs first --classify --recursive --depth=2"
alias lsl="lsd -A --group-dirs first --classify -l"
alias mv="mv -iv"
alias open="open_command"
alias rm="rm -irv"
alias rmf="rm -rf"
alias q="exit"
# Git
alias g="git"
alias ga="git add"
alias gc="git commit -m"
alias gca="git commit --all -m"
alias gl="git pull --rebase --autostash"
alias gp="git push"
alias gss="git status -s"
alias gsd="git status -s && git diff HEAD"
alias gbrr="git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'"
alias gcm='git checkout $(git_main_branch)'
alias gcma="git commit --amend -m"
alias gcman="git commit --amend --no-edit"
alias gcmn="git add . && git commit --amend --no-edit"
alias gdh="git diff HEAD"
alias gg="lazygit"
alias ghkey='gh ssh-key add ~/.ssh/id_ed25519.pub --title "$(hostname)" --type signing'
alias ghpr="gh pr create"
alias ghpd="pr_diff"
alias ghpf="pr_files"
alias ghrc="gh repo clone"
alias ghrd="gh repo edit -d"
alias ghrh="gh repo edit -h"
alias ghro="gh repo view --web"
alias ghrr="gh repo rename"
alias ghrs="gh release create"
alias ghrt="gh repo edit --add-topic "
alias ghrv="gh repo edit --visibility "
alias gmv="git mv"
alias gmx="git merge -X ours"
alias greb="git rebase --interactive --autostash --keep-empty --no-autosquash --rebase-merges main"
alias gsv="git status -v"
alias gtop='cd "$(git rev-parse --show-toplevel)"'
# Editor
alias e='nvim $(fzf)'
alias emd='emacs --daemon &'
alias emc="emacsclient -c -a 'emacs'"
alias emt='emacs --no-window-system'
alias vi="nvim"
alias vg="grep_open"
alias vc="changed_files"
alias vr="review_changes"
alias vb="binary_edit"
alias me='"$EDITOR" README.md'
# Configs
alias alac='"$EDITOR" ~/.config/alacritty/alacritty.toml'
alias alia='"$EDITOR" ~/.config/shell/aliases.sh'
alias bashc='"$EDITOR" ~/.bashrc'
alias enva='"$EDITOR" ~/.config/shell/environment.sh'
alias func='"$EDITOR" ~/.config/shell/functions.sh'
alias gitc='"$EDITOR" ~/.gitconfig'
alias kitc='"$EDITOR" ~/.config/kitty/kitty.conf'
alias loca='"$EDITOR" ~/.config/shell/local.sh'
alias nvimc="nvim ~/.config/nvim/init.lua"
alias p2k='"$EDITOR" "$ZDOTDIR/prompt/init.zsh"'
alias qutc='"$EDITOR" ~/.config/qutebrowser/config.py'
alias tmuxc='"$EDITOR" ~/.config/tmux/tmux.conf'
alias vic="nvim ~/.config/nvim/init.lua"
alias vip="nvim ~/.config/nvim/lua/plugins/list.lua"
alias vimc="vim ~/.vimrc"
alias zshc='"$EDITOR" "$ZDOTDIR"/.zshrc'
# General
alias asc="asciinema"
alias cless="colorize_less -N"
alias cols="spectrum_ls"
alias exsu="exercism submit"
alias files="fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'"
alias fix="fuck"
alias heic_to_jpg="magick mogrify -format jpg *.HEIC"
alias icat="kitty +kitten icat"
alias java8="export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/jre"
alias java11="export JAVA_HOME=/usr/lib/jvm/java-11-openjdk/"
alias jupn="jupyter notebook"
alias kpa='keepassxc-cli clip "$KEEPASS_DB"'
alias mlc="npx markdown-link-check -pvq"
alias ncdu="ncdu --color=dark -x"
alias pick="pastel pick | pastel format hex | ccp"
alias png="pngquant --ext .png --force"
alias pp="prettyping --nolegend"
alias scr="scrot -s -l width=3,color='#1688f0',mode=edge,opacity=75 -F ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png -e 'xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png'"
alias scrf="scrot -cd 3 -F ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png -e 'xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png'"
alias scrw="scrot -ubcd 3 -F ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png -e 'xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/snap-%Y-%m-%d-%H-%M-%S.png'"
alias serv="npx live-server --port=1234 ."
alias sto="stackoverflow"
alias tmux="tmux -u"
alias tmuxm="tmux new-session \; split-window -h \; split-window -v \; attach"
alias wit="wiki-tui"
alias xp="xplr"
alias ytdl="youtube-dl"
alias play="playerctl play-pause"
alias next="playerctl next"
alias prev="playerctl previous"
alias song="playerctl metadata title"
alias syslog="sudo journalctl -b"
alias logshare="curl -F 'file=@-' 0x0.st"
# Languages
alias rsc="bundle exec rails console"
alias rsv="bundle exec rails server"
alias rsp="bundle exec rspec"
alias rcp="bundle exec rubocop -A"
# Package Manger
alias apti="sudo apt install"
alias apts="apt search"
alias aptr="sudo apt remove"
alias aptq="apt show"
alias aptu="sudo apt update && sudo apt upgrade"
alias dnfi="sudo dnf install"
alias dnfs="dnf search"
alias dnfr="sudo dnf remove"
alias dnfu="sudo dnf update"
alias npi="npm install"
alias npr="npm run"
alias paci="sudo pacman -S"
alias pacq="pacman -Qi"
alias pacr="sudo pacman -Rsc"
# alias pacrd="pacr $(pacman -Qdtq | tr '\n' ' ')"
alias pacs="pacman -Ss"
alias pacl="pacman -Q"
alias pacm="sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syu"
alias pacu="sudo pacman -Syu"
alias yayi="yay -S"
alias yayl="pacman -Qm"
alias yayu="yay -Syu"
# System
alias aran="autorandr -l"
alias blue="bluetuith"
alias litu="sudo light -A 10"
alias litd="sudo light -U 10"
alias plasmar="kquitapp5 plasmashell && kstart5 plasmashell"
alias shad="ssh-add ~/.ssh/id_rsa"
alias shag='eval "$(ssh-agent -s)"'
alias sysd="sudo systemctl disable"
alias syse="sudo systemctl enable"
alias sysr="sudo systemctl restart"
alias syss="systemctl status"
alias systa="sudo systemctl start"
alias systo="sudo systemctl stop"
alias topg="topgrade --no-retry -y"
alias topG="topgrade --no-retry -y --only git_repos"
alias vol="pulsemixer"
alias volu="amixer sset 'Master' 10%+"
alias vold="amixer sset 'Master' 10%-"
alias wifi="nmtui"
# Mac only
if [[ "$OSTYPE" == "darwin"* ]]; then
alias aerc='"$EDITOR" "$HOME"/.config/aerospace/aerospace.toml'
alias aerr="aerospace reload-config"
alias aert="aerospace enable toggle"
alias brc="brew cleanup"
alias brd="brew bundle dump --no-restart --global --force"
alias bri="brew install"
alias brI="brew bundle install --global --verbose --no-upgrade"
alias brl="brew list"
alias brq="brew info"
alias brr="brew uninstall"
alias brs="brew search"
alias bru="brew upgrade"
alias ip="ipconfig getifaddr en0"
alias macdis="displayplacer 'id:1 enablded:false'"
alias play="nowplaying-cli togglePlayPause"
alias next="nowplaying-cli next"
alias prev="nowplaying-cli previous"
alias qutc='"$EDITOR" ~/.qutebrowser/config.py'
fi