-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
55 lines (45 loc) · 1.22 KB
/
.bashrc
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
# My personal .bashrc file
if [[ $- == *i* ]]; then
source ~/dotfiles/bash/prompt
else
return
fi
if [ -e ~/dotfiles/bash/functions ]; then
source ~/dotfiles/bash/functions
fi
if [ -e ~/dotfiles/bash/aliases ]; then
source ~/dotfiles/bash/aliases
fi
# History specific settings
HISTCONTROL=ignoreboth
HISTSIZE=10000
HISTFILESIZE=20000
# Exports
export EDITOR=vim
export VISUAL=vim
export TERM=xterm-256color
export PATH="$HOME/bin:$PATH"
# PS2
PS2="$ >>> "
# Set bash to use vim keys
# As I have my "custom" prompt which resets the readline options I have them
# here instead of .inputec and I'm skipping set -o vi
# bind 'set editing-mode vi'
# bind 'set show-mode-in-prompt on'
# bind 'set vi-ins-mode-string I'
# bind 'set vi-cmd-mode-string N'
# Colors
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi
# Launch neofetch with bash start
if [ -x /usr/bin/screenfetch ]; then
screenfetch
fi
cd
# This is only used for WSL
if [[ $(uname -r) == *"microsoft"* ]]; then
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
export LIBGL_ALWAYS_INDIRECT=1
export BROWSER=/mnt/c/Program/Google/Chrome/Application/chrome.exe
fi