-
Notifications
You must be signed in to change notification settings - Fork 2
/
.alias
119 lines (98 loc) Β· 3.66 KB
/
.alias
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
### macOS Specific
if [[ "$OSTYPE" == "darwin"* ]]; then
alias gotouserchrome='cd $HOME/Library/Application\ Support/Firefox/Profiles/h7l6bngt.default-release/chrome'
alias gtuserchrome='cd $HOME/Library/Application\ Support/Firefox/Profiles/h7l6bngt.default-release/chrome'
alias flushdnsmac='sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder'
alias night="nightlight"
alias gotovault='cd ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/'
alias gotonvim='cd ~/.dotfiles/nvim && nvim'
### GIT
alias gp='git branch --show-current | pbcopy && git push origin $(pbpaste)'
fi
if [[ "$OSTYPE" == "linux-gnu" ]]; then
alias cleancalendar='pkill -f calendar && sudo rm -rf ~/{.local/share,.cache}/evolution/calendar/ && gnome-calendar &'
### GIT
alias gp='git branch --show-current | xclip -selection clipboard && git push origin $(xclip -selection clipboard -o)'
alias gst='git status'
### MOVEMENT
alias gotopoly='cd ~/.dotfiles/polybar && vim config.ini'
alias gtpoly='cd ~/.dotfiles/polybar && vim config.ini'
### Arch Linux
alias pacautoremove='pacman -Qdtq | sudo pacman -Rs -'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clip'
# xevv
xevv(){
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
}
fi
### GENERAL
alias li='ls -l'
alias lh='ls -ld .?*' # only show hidden files
alias -s md=typora # Markdown files
alias ld="ls -ld */" # List in long format, only directories
alias lif="li -d */" # Lists only folders
alias lf="ls -d */" # Lists only folders
alias weather='curl http://wttr.in/'
alias cleanautocomplete='rm -rf $HISTFILE'
alias n='nvim'
alias please='sudo'
alias godmode='sudo su'
alias dedoff='shutdown now'
alias htop='btop'
### Replacements
alias neofetch='fastfetch'
### GIT
alias g='git'
alias st='status'
alias gd='git diff'
alias gdc='git diff --cached'
alias gitl="git log --graph --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gc='git commit -v'
alias diffcom='git diff HEAD~1'
# alias ga='git add'
# alias gd='git diff'
# alias gds='git diff --staged'
# alias gf='git fetch'
alias glogone='git log --oneline'
alias glgg='git log --graph'
alias glgga='git log --graph --decorate --all'
alias glgm='git log --graph --max-count=10'
alias glog='git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'
alias gpom='git push origin main'
alias gpoma='git push origin master'
# alias grmc='git rm --cached'
# alias gst='git status'
# alias sttt='status'
alias clean='git-lfs clean -- %f'
# alias smudge='git-lfs smudge -- %f'
# alias process='git-lfs filter-process'
### MOVEMENT
alias gotoalias='nvim ~/.alias'
alias gotostarship='nvim ~/.config/starship.toml'
## OTHER MOVEMENTS
alias zshrc='nvim ~/.zshrc'
alias kittyrc='nvim ~/.config/kitty/kitty.conf'
alias gotokitty='cd ~/.config/kitty && nvim kitty.conf'
alias cpbranch='git branch --show-current | pbcopy && echo "β¨ done copying branch:" && pbpaste'
alias js='node'
### PYTHON aliases:
alias pipi='pip install --upgrade pip && pip install -r requirements.txt && pip freeze β local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U && pip freeze > requirements.txt && git add requirements.txt && git commit -m "Atualiza pacotes" && git push'
alias pip='pip3'
### RUBY aliases
alias beijos='bundle exec jekyll serve'
### Creating and entering directories
function take {
mkdir -p $1
cd $1
}
### cleaning the terminal
alias c=clear
### sourcing zsh:
alias s='source ~/.zshrc'
### MODERN LINUX
alias cat='bat'
alias df='duf'
alias tree='broot'
alias ping='gping'
alias procs='ps'