logansdotfiles/.bashrc

49 lines
1.6 KiB
Bash

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
fi
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias sudo='sudo '
alias cheat='f() { curl cheat.sh/$1; };f'
alias updatemirrors='sudo reflector --age 12 --number 10 --protocol https --sort rate --save /etc/pacman.d/mirrorlist'
alias pacman-clean='pacman -Rsn $(pacman -Qdtq)'
alias memepv='mpv --vo=tct --profile=sw-fast'
alias sw='i3-swallow'
alias gpudrivers='lspci -nnk | grep -i VGA -A2'
export EDITOR=vim
export PATH=$PATH:~/.local/bin
export HISTSIZE=10000
export HISTFILESIZE=20000
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
export LESS=-R
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
complete -cf sudo
complete -cf swallow
complete -cf sw
eval "$(thefuck --alias)"
export PS1="\[\033[38;5;208m\]\u\[$(tput sgr0)\]@\h:\[$(tput sgr0)\]\[\033[38;5;32m\][\w]\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]"
#PS1="[\\u@\\h: \\w]\$ "
#PS1="\033[33m[\\u@\\h: \033[33m\\w\033[33m]\033[0m\$ "
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh