-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_aliases
More file actions
74 lines (67 loc) · 1.89 KB
/
Copy path.bash_aliases
File metadata and controls
74 lines (67 loc) · 1.89 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
# cd related aliases
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias dev='cd ~/dev'
alias devw='cd /windows/BigDrive/dev'
alias conf='cd ~/.config'
alias win='cd /windows'
alias bigd='cd /windows/BigDrive'
# Profiling
alias mem10='ps auxf | sort -nr -k 4 | head -10'
alias mem5='ps auxf | sort -nr -k 4 | head -5'
alias df='df -h'
# Edit specific things
alias ebash='(cd ~/; nvim .bashrc)'
alias ebasha='(cd ~/; nvim .bash_aliases)'
alias envim='(cd ~/.config/nvim; nvim)'
alias ei3='(cd ~/.config/i3; nvim config)'
alias econf='(cd ~/.config; nvim)'
alias edisc='sudo nvim /opt/discord/resources/build_info.json'
# Whatever
alias weather='curl wttr.in'
alias reload-bash='source ~/.bashrc'
alias reload-waybar='pkill waybar && hyprctl dispatch exec waybar'
alias yayf="yay -Slq | fzf --multi --preview 'yay -Sii {1}' --preview-window=down:75% | xargs -ro yay -S"
alias arch-docs="xdg-open file:///usr/share/doc/arch-wiki/html/en/Main_page.html"
# Command extensions
alias pinstall='sudo pacman -S'
#alias rg to grep if rg is installed
if command -v rg &> /dev/null; then
alias grep='rg'
else
echo 'rg not installed'
alias grep='grep --color=auto'
fi
shutdown() {
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
command shutdown -h now "$@"
else
hyprshutdown -t 'Shutting down...' --post-cmd 'shutdown -P 0'
fi
}
reboot() {
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
command reboot "$@"
else
hyprshutdown -t 'Restarting...' --post-cmd 'reboot'
fi
}
alias cp='cp -i'
alias mv='mv -i'
alias rm='trash -v'
alias tree='tree -CAhF --dirsfirst'
alias ll='ls -lhFa --color=auto'
# Short commands
alias noc='notecross'
# Git
alias gs='git status'
alias ga='git add'
alias gaa='git add --all'
alias gc='git commit'
alias gl='git log --oneline -n 10'
alias gb='git checkout -b'
alias gd='git diff'
alias gps='git push'
alias gf='git fetch'
alias gp='git pull'