b7fa58a01bdea3abcbc333b59b4ec76953049ca6
[dotfiles.git] / shell / .bashrc
1 shopt -s checkwinsize histappend globstar
2
3 export MESA_LOADER_DRIVER_OVERRIDE=i965
4 export HISTCONTROL=erasedups
5 export HISTFILESIZE=NOTHING
6 export HISTSIZE=NOTHING
7 export PROMPT_COMMAND='history -a'
8
9 export TERMINAL=~/projects/st/st
10 export EDITOR="vim -p"
11 export TERM=screen
12 export BROWSER=firefox
13 export PAGER=less
14
15 export SUDO_ASKPASS=/usr/lib/ssh/ssh-askpass
16
17 # XDG fixes
18 alias svn="svn --config-dir \"${XDG_CONFIG_HOME:-$HOME/.config}\"/subversion"
19 alias tmux="tmux -f \"${XDG_CONFIG_HOME:-$HOME/.config}/tmux/config\""
20 alias tudu="tudu -c \"${XDG_CONFIG_HOME:-$HOME/.config}/tudu/config\""
21 export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"/notmuch/config
22 export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"/pass
23 export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
24
25 if [ "$SCHROOT_CHROOT_NAME" = "x86" ]
26 then
27 export CLEAN_HOME=/opt/clean-x86
28 else
29 export CLEAN_HOME=/opt/clean-x64
30 fi
31
32 export PATH=$CLEAN_HOME/bin:~/.local/bin:~/.nitrile/bin:~/.cabal/bin:$PATH
33 export PATH=/opt/texlive/2021/bin/x86_64-linux:/opt/zotero:/opt/arduino:/opt/beets/bin:/opt/firefox:$PATH
34
35 export MANPATH=~/.local/share/man:/opt/texlive/2021/texmf-dist/doc/man:/opt/arduino/java/man:$MANPATH
36
37 #export GTK_IM_MODULE=xim
38 #export QT_IM_MODULE=xim
39 #export QT_QPA_PLATFORMTHEME=qt5ct
40
41 export NNTPSERVER=news.tweak.nl
42 alias slrn="slrn -i \"${XDG_CONFIG_HOME:-$HOME/.config}/slrn/slrnrc\""
43
44 alias ls='ls --color=auto'
45 alias grep='grep --color=auto'
46 alias vi='vim --servername VIM'
47 alias kmfbmagp=tmuxmail
48
49 if [ -f /etc/bash_completion ]
50 then
51 . /etc/bash_completion
52 fi
53
54 set_prompt(){
55 last_c=$?
56 PS1='\H'
57 [[ $last_c -ge 1 ]] && PS1="($last_c) $PS1"
58 if [[ -n "$SCHROOT_CHROOT_NAME" ]]
59 then
60 PS1="($SCHROOT_CHROOT_NAME)$PS1"
61 fi
62 if [[ "$COLUMNS" -le 80 ]]
63 then
64 PS1="$PS1 $(echo "$PWD" | sed -e 's|'"$HOME"'|~|g' -e 's|\([^/][^/]\)[^\/]\{3,\}\/|\1..\/|g')"
65 else
66 PS1="$PS1\w"
67 fi
68 PS1="$PS1\$ "
69 }
70 PROMPT_COMMAND='set_prompt'
71
72 # >>> conda initialize >>>
73 # !! Contents within this block are managed by 'conda init' !!
74 __conda_setup="$('/home/mrl/.local/share/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
75 if [ $? -eq 0 ]; then
76 eval "$__conda_setup"
77 else
78 if [ -f "/home/mrl/.local/share/anaconda3/etc/profile.d/conda.sh" ]; then
79 . "/home/mrl/.local/share/anaconda3/etc/profile.d/conda.sh"
80 else
81 export PATH="/home/mrl/.local/share/anaconda3/bin:$PATH"
82 fi
83 fi
84 unset __conda_setup
85 # <<< conda initialize <<<
86