You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.0 KiB
Bash
80 lines
2.0 KiB
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
export EDITOR='nvim'
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
export HISTCONTROL=ignoreboth:erasedups
|
|
|
|
PS1='[\u@\h \W]\$ '
|
|
|
|
if [ -d "$HOME/.bin" ] ;
|
|
then PATH="$HOME/.bin:$PATH"
|
|
fi
|
|
|
|
#Add date and time to bash history
|
|
export HISTTIMEFORMAT="%h %d %H:%M:%S "
|
|
|
|
#Increase bash history size
|
|
#Number of commands to remember in the command history
|
|
export HISTSIZE=10000
|
|
#The maximum number of lines contained in the history file
|
|
export HISTFILESIZE=10000
|
|
|
|
#Append bash commands to history file instead of overwrite
|
|
shopt -s histappend
|
|
|
|
#Store bash history immediately
|
|
PROMPT_COMMAND='history -a'
|
|
|
|
#list
|
|
alias ls='ls --color=auto'
|
|
alias la='ls -a'
|
|
alias ll='ls -la'
|
|
alias l='ls'
|
|
alias l.="ls -A | egrep '^\.'"
|
|
alias nv='nvim'
|
|
|
|
#fix obvious typo's
|
|
alias cd..='cd ..'
|
|
alias pdw="pwd"
|
|
|
|
## Colorize the grep command output for ease of use (good for log files)##
|
|
alias grep='grep --color=auto'
|
|
alias egrep='egrep --color=auto'
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
#readable output
|
|
alias df='df -h'
|
|
|
|
#pacman unlock
|
|
alias unlock="sudo rm /var/lib/pacman/db.lck"
|
|
|
|
#grub update
|
|
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
|
|
|
#add new fonts
|
|
alias fc='sudo fc-cache -fv'
|
|
|
|
#hardware info --short
|
|
alias hw="hwinfo --short"
|
|
|
|
#get fastest mirrors in your neighborhood
|
|
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
|
|
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
|
|
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
|
|
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
|
|
|
|
#Cleanup orphaned packages
|
|
alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
|
|
|
|
alias pip_update_all="pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
|
|
|
|
#create a file called .bashrc-personal and put all your personal aliases
|
|
#in there. They will not be overwritten by skel.
|
|
|
|
[[ -f ~/.bashrc-personal ]] && . ~/.bashrc-personal
|