# ~/.bashrc
# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

shopt -s histappend
export HISTSIZE=50
export HISTFILESIZE=50
export HISTFILE=/var/log/.bash_history
export PATH=/opt/pixel/euclide:$PATH

# Save the history after each command finishes
# (we use '-w' because '-a' ignores the limit size)

export PROMPT_COMMAND="history -w; $PROMPT_COMMAND"

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# useful aliases
alias rw='mount -o remount,rw /'
alias ro='mount -o remount,ro /'
alias ll='ls -als'
alias lssvc='systemctl list-units --type=service'
alias scan0='socketcand -v -n -i can0'
alias scan1='socketcand -v -n -i can1'
alias showcan0='ip -details -statistics link show can0'
alias showcan1='ip -details -statistics link show can1'
alias h='history'
alias top='htop'
alias restart='systemctl restart euclide && systemctl restart euclide_web'
