aboutsummaryrefslogtreecommitdiff
path: root/.config/aliasrc
diff options
context:
space:
mode:
Diffstat (limited to '.config/aliasrc')
-rw-r--r--.config/aliasrc61
1 files changed, 61 insertions, 0 deletions
diff --git a/.config/aliasrc b/.config/aliasrc
new file mode 100644
index 0000000..822d6d5
--- /dev/null
+++ b/.config/aliasrc
@@ -0,0 +1,61 @@
+# 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 ls="ls --color=auto --group-directories-first"
+alias grep="grep --color=auto"
+alias diff="diff --color=auto"
+
+# 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"
+
+# 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"