blob: 74d6ec44a54b5860930296ff7a73a49ac0b57135 (
plain) (
blame)
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
|
# Nick's light shell aliases
# General utility
command -v doas >/dev/null \
&& alias sudo="doas " \
|| alias sudo="sudo "
alias cp="cp -iv"
alias mv="mv -iv"
# Utility colours
alias grep="grep --color=auto"
if [ "$(uname -s)" != "Darwin" ]; then
alias ls="ls --color=auto --group-directories-first"
alias diff="diff --color=auto"
else
alias ls="ls -G"
fi
# dotfiles management
alias d="git --git-dir=$HOME/.dotlite.git --work-tree=$HOME"
# Shortcuts
alias v="$EDITOR"
alias vi="$EDITOR"
alias vim="$EDITOR"
alias e="$FILE"
alias r="ranger"
alias g="git"
alias o="xdg-open"
# Utility quick commands
alias mem="ps axch -o cmd:15,%mem --sort=-%mem | sed 10q"
alias cpu="ps axch -o cmd:15,%cpu --sort=-%cpu | sed 10q"
alias rcp="rsync -vzrh --times --stats --progress --itemize-changes"
# Arch
# pacman
alias p="sudo pacman"
alias pS="sudo pacman -S"
alias pR="sudo pacman -R"
alias pU="sudo pacman -Syu"
alias pQ="pacman -Q"
# yay (AUR)
alias y="yay"
alias yS="yay -S"
alias yR="yay -R"
alias yU="yay -Syu"
# Fedora
alias dI="sudo dnf install"
alias dR="sudo dnf remove"
alias dU="sudo dnf upgrade"
alias dQ="rpm -qa"
# macOS
alias bI="brew install"
alias bIc="brew install --cask"
alias bR="brew uninstall"
alias bU="brew upgrade"
alias bQ="brew list"
alias bQc="brew list --cask"
# Utility functions
# Fuzzy find file + open in editor
vf() { fzf | xargs -r -I % $EDITOR % ;}
# Config files
alias cfb="$EDITOR $HOME/.bashrc"
alias cfz="$EDITOR $HOME/.zshrc"
alias cfp="$EDITOR $HOME/.profile"
alias cfv="$EDITOR $HOME/.config/nvim/init.vim"
alias cfa="$EDITOR $HOME/.config/aliasrc"
alias cfg="$EDITOR $HOME/.config/git/config"
alias cfi="$EDITOR $HOME/.config/i3/config"
alias cfy="$EDITOR $HOME/.config/yabai/yabairc"
alias cfs="$EDITOR $HOME/.config/skhd/skhdrc"
|