Xinqi Bao's Git

9a17f5133f0794c528b65825f3e47fbece89807c
[dotfiles.git] / .bashrc
1 #
2 # ~/.bashrc
3 #
4
5 # If not running interactively, don't do anything
6 [[ $- != *i* ]] && return
7
8 export PATH=${HOME}/.local/opt/node/bin:${PATH}
9 export PATH=${HOME}/.local/bin:${PATH}
10 export PATH=${HOME}/tool:${PATH}
11
12 alias ls='ls --color=auto'
13 alias ll='ls --color=auto -lhrt'
14 alias vim='nvim'
15 alias vimdiff='nvim -d'
16
17 export EDITOR=nvim
18 export BROWSER=firefox
19 export TERM=xterm-256color
20 export PS1="[\[\e[36;1m\]\u@\h \[\e[32;1m\]\w\[\e[m\]]\[\e[33m\](\$(git branch 2>/dev/null | grep '^*' | colrm 1 2))\n\[\e[m\]~~~>\$ "
21
22 # Set up fzf key bindings and fuzzy completion
23 eval "$(fzf --bash)"
24 export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'"
25
26 ulimit -c unlimited
27
28 <<COMMENT
29 export proxy_url=http://localhost:1080
30 export http_proxy=$proxy_url
31 export https_proxy=$proxy_url
32 export HTTP_PROXY=$proxy_url
33 export HTTPS_PROXY=$proxy_url
34 COMMENT
35
36 if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
37 exec startx
38 fi