Configuration files used by various tools on Linux.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

63 lines
1.3 KiB

#
# ~/.bashrc
#
## prompt
if [[ ${EUID} == 0 ]] ; then
PS1='\h \[\033[01;36m\]\W \[\033[01;31m\]\$\[\033[00m\] '
else
PS1='\u@\h \[\033[01;36m\]\W \[\033[01;32m\]\$\[\033[00m\] '
fi
## completion
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
## shell options
shopt -s histappend
shopt -s cmdhist
shopt -s checkwinsize
shopt -s expand_aliases
shopt -s globstar
shopt -s checkjobs
## aliases
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias cp='cp -i'
alias df='df -hx tmpfs'
alias du='du -h'
alias file='file -b'
alias free='free -hw'
alias grep='grep --colour=auto'
alias ls='ls -h --color=auto'
alias l='ls -l'
alias ll='ls -al'
alias mkdir='mkdir -p'
alias nano='vim'
alias pacman='pacman --color=auto'
alias pactree='pactree -c'
alias tree='tree -C'
alias vi='vim'
## environment
export EDITOR=vim
export HISTSIZE=10000
export HISTCONTROL=ignoredups:ignorespace
export JAVA_HOME=/usr/lib/jvm/default
export KEYMAP=de-latin1
export LANG=en_GB.UTF-8
export LANGUAGE=$LANG
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
export TIMEFORMAT='%R'
export TZ='Europe/Berlin'
export VISUAL=$EDITOR
# functions
dotenv () {
set -a; [ -f .env ] && . .env; set +a
env|sort
}