summaryrefslogtreecommitdiff
path: root/bashrc
blob: 2dc5332b68fe82ccc08eb9ad26c65477b289bc39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# ---------------------------------------------------------------------------- #
# ----- More STATIC part ----------------------------------------------------- #
# ---------------------------------------------------------------------------- #

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# bash(1) for info and more options
HISTCONTROL=ignoreboth                  # duplicated lines sequentially & starting with space
HISTSIZE=10000                          # number of commands remembered
HISTFILESIZE=20000                      # number of lines in history_file (truncate above)
HISTTIMEFORMAT="[%a] %d-%b %H:%M | "    # format for history command

# check options: http://www.ss64.com/bash/shopt.html
shopt -s histappend     # append to the history file, don't overwrite it
shopt -s checkwinsize   # check window size and update $LINES and $COLUMNS.

# see lesspipe(1)
[ -x /usr/bin/lesspipe.sh ] && eval "$(SHELL=/bin/sh lesspipe.sh)"

# all alias in ~/.bash_aliases
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

# ---------------------------------------------------------------------------- #
# ----- New stuff usually goes here :-) -------------------------------------- #
# ---------------------------------------------------------------------------- #
PATH=$HOME/.local/bin:$PATH
PATH=$PATH:$HOME/scripts
EDITOR=vim
BROWSER=firefox
#LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:*.deb=90'

if [ `whoami` == "root" ]; then
        PS1="\[$bldred\](\h)\[$txtwht\] \W\[$bldred\] #\[$txtwht\]"
else
    if [ $UNDER_JHBUILD ]; then
        PS1="\[$bldpur\](jhbuild)\[$txtwht\] \W\[$bldgrn\] $\[$txtwht\]"
    else
        PS1="\[$bldgrn\](\h)\[$txtwht\] \W\[$bldgrn\] $\[$txtwht\]"
    fi
fi

# vim:ts=4:sw=4