From f4dbac8cf8177e9e60ed693330226b7a2831c553 Mon Sep 17 00:00:00 2001 From: koumakpet Date: Sun, 8 Mar 2020 15:03:44 +0100 Subject: [PATCH] Alias/Functions update --- files/.config/sh/.aliases | 10 ++++++---- files/.config/sh/.functions | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/files/.config/sh/.aliases b/files/.config/sh/.aliases index 77b4ed7..0c0cfe5 100755 --- a/files/.config/sh/.aliases +++ b/files/.config/sh/.aliases @@ -43,9 +43,11 @@ alias py2='python2' alias cfvim='vim ~/.vimrc' alias cfzsh='vim ~/config/zsh/.zsh_config' alias cfzshrc='vim ~/.zshrc' +alias cfalias='vim ~/.config/sh/.aliases' +alias cffunction='vim ~/.config/sh/.functions' # Replacements -alias dd='dcfldd' # Use dcfldd instead of dd (shows progress) +alias dd='dcfldd' # Use dcfldd instead of dd (shows progress) (pacman -S dcfldd) alias du='du -ach | sort -h' # Sort du by size alias mkdir='mkdir -p' # Mkdir with automatic creation of parent directories alias ps='ps auxf' # Print all processes @@ -66,13 +68,13 @@ alias dotdirs='exa -hulaD -d .[a-z]*' # Show all dotdirs alias dotall='exa -hula -d .[a-z]*' # Show both dotdirs and dotfiles alias clean='rm -rf ~/.local/share/Trash/* && rm -rf ~/Downloads/*' # Remove trash and downloads files alias colors-256='curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash' # Show color table -alias minecraft='minecraft-launcher' alias o='dolphin .' # open in dolphin (file manager) alias pacman-extract='pacman -Syw --cachedir .' # Extract package/es into current floders alias mount-table='df' # Show list of all mounted devices and their mount locations alias swapout='sudo swapoff -a; sudo swapon -a' # Reset swap (move everything to RAM) alias sound_control='alsamixer' # Sound control tool in alsa_utils package - +alias pacman-delete-orphans='pacman -Rns $(pacman -Qtdq)' # Remove orphaned packages (oackages which are no longer required) +alias open-ports='lsof -i' # If user is not root, pass all commands via sudo if [ $UID -ne 0 ]; then @@ -80,7 +82,7 @@ if [ $UID -ne 0 ]; then ## Uncomment if you are using autocompletion (is ZSH) #alias sudo='nocorrect sudo' - ## Comment this if you are not using autocompletion (in ZSH) + ## Comment this if you are using autocompletion (in ZSH) alias sudo='sudo ' alias unsudo='sudo -k' # Reset sudo timeout (sudo will require password) diff --git a/files/.config/sh/.functions b/files/.config/sh/.functions index 82353c8..3d4eb82 100755 --- a/files/.config/sh/.functions +++ b/files/.config/sh/.functions @@ -235,3 +235,4 @@ function update-git-repos() { echo -e "\n\033[32mComplete!\033[0m\n" } +