|
|
|
#
|
|
|
|
# ~/.bashrc
|
|
|
|
#
|
|
|
|
|
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
|
|
|
export HISTSIZE=100000
|
|
|
|
export HISTFILESIZE=100000
|
|
|
|
export PATH="$HOME/.bin:$PATH"
|
|
|
|
|
|
|
|
if [ -x "$(command -v vim)" ]; then
|
|
|
|
export EDITOR=vim
|
|
|
|
elif [ -x "$(command -v vi)" ]; then
|
|
|
|
export EDITOR=vi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# enable wayland
|
|
|
|
export QT_QPA_PLATFORM=wayland-egl
|
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
|
|
|
|
|
|
|
if [ -f '/etc/bash_completion' ]; then
|
|
|
|
# debian
|
|
|
|
source /etc/bash_completion
|
|
|
|
else
|
|
|
|
# arch
|
|
|
|
source /usr/share/git/git-prompt.sh
|
|
|
|
fi
|
|
|
|
PS1='`[ $? = 0 ] || echo "$? "`[\u@\h \w`__git_ps1 " (%s)"`]\$ '
|
|
|
|
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias ip='ip --color=auto'
|
|
|
|
alias autopurge='sudo pacman -Rns $(pacman -Qdtq)'
|
|
|
|
alias aur='auracle'
|
|
|
|
alias syu='sudo snapshot pre-syu && sudo pacman -Syu; sudo pacman -Rns $(pacman -Qdtq); pacman -Qem; aur sync'
|
|
|
|
alias d-u='sudo apt update && sudo apt full-upgrade && sudo apt --purge autoremove && sudo apt clean'
|
|
|
|
alias pp='git pull -r && git push'
|
|
|
|
alias statdiff='git status && git diff --staged'
|
|
|
|
alias gcode='git pull -r && code . && exit'
|
|
|
|
|
|
|
|
function wcat {
|
|
|
|
cat "$(which -- "$1")"
|
|
|
|
}
|
|
|
|
function wttr {
|
|
|
|
curl "https://wttr.in/$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
# workaround for missing alacritty terminfo on remote terminals
|
|
|
|
# https://github.com/alacritty/alacritty/issues/3360#issuecomment-588441023
|
|
|
|
alias ssh='TERM=xterm-256color ssh'
|