From 285e278617a230832ef4d05560b0a8cfeee4f308 Mon Sep 17 00:00:00 2001 From: "Jyotirmoy Bandyopadhyaya [Bravo68]" Date: Fri, 3 Feb 2023 09:17:34 +0000 Subject: [PATCH] Create .bashrc_garuda --- .bashrc_garuda | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .bashrc_garuda diff --git a/.bashrc_garuda b/.bashrc_garuda new file mode 100644 index 0000000..c341d6f --- /dev/null +++ b/.bashrc_garuda @@ -0,0 +1,54 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Load starship prompt if starship is installed +if [ -x /usr/bin/starship ]; then + __main() { + local major="${BASH_VERSINFO[0]}" + local minor="${BASH_VERSINFO[1]}" + + if ((major > 4)) || { ((major == 4)) && ((minor >= 1)); }; then + source <("/usr/bin/starship" init bash --print-full-init) + else + source /dev/stdin <<<"$("/usr/bin/starship" init bash --print-full-init)" + fi + } + __main + unset -f __main +fi + +# Advanced command-not-found hook +source /usr/share/doc/find-the-command/ftc.bash + +# Aliases +alias dir='dir --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias fixpacman="sudo rm /var/lib/pacman/db.lck" +alias grep='grep --color=auto' +alias grubup="sudo update-grub" +alias hw='hwinfo --short' +alias psmem10='ps auxf | sort -nr -k 4 | head -10' +alias psmem='ps auxf | sort -nr -k 4' +alias rmpkg="sudo pacman -Rdd" +alias tarnow='tar -acf ' +alias untar='tar -zxvf ' +alias upd='/usr/bin/update' +alias vdir='vdir --color=auto' +alias wget='wget -c ' + +# Help people new to Arch +alias apt-get='man pacman' +alias apt='man pacman' +alias helpme='cht.sh --shell' +alias please='sudo' +alias tb='nc termbin.com 9999' + +# Cleanup orphaned packages +alias cleanup='sudo pacman -Rns `pacman -Qtdq`' + +# Get the error messages from journalctl +alias jctl="journalctl -p 3 -xb" + +# Recent installed packages +alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"