-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_bashrc
76 lines (65 loc) · 1.53 KB
/
dot_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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc
function vi() {
if [ $# -eq 0 ]; then
vim
return
fi
chezmoi verify $1 > /dev/null 2>&1\
&& chezmoi edit --watch --hardlink=false $1\
|| vim $@
}
export MOZ_ENABLE_WAYLAND=1
export EDITOR=/usr/bin/vi
alias google-chrome="google-chrome --password-store=gnome"
if [[ $- == *i* ]]; then
FGBLK=$( tput setaf 0 ) # 000000
FGRED=$( tput setaf 1 ) # ff0000
FGGRN=$( tput setaf 121 ) # 00ff00
FGYLO=$( tput setaf 11 ) # ffff00
FGBLU=$( tput setaf 4 ) # 0000ff
FGMAG=$( tput setaf 5 ) # ff00ff
FGCYN=$( tput setaf 6 ) # 00ffff
FGWHT=$( tput setaf 7 ) # ffffff
BGBLK=$( tput setab 0 ) # 000000
BGRED=$( tput setab 1 ) # ff0000
BGGRN=$( tput setab 2 ) # 00ff00
BGYLO=$( tput setab 3 ) # ffff00
BGBLU=$( tput setab 4 ) # 0000ff
BGMAG=$( tput setab 5 ) # ff00ff
BGCYN=$( tput setab 6 ) # 00ffff
BGWHT=$( tput setab 7 ) # ffffff
RESET=$( tput sgr0 )
BOLDM=$( tput bold )
UNDER=$( tput smul )
REVRS=$( tput rev )
fi
case $HOSTNAME in
thinkpad.untrepid.com)
FG1=$FGBLU
FG2=$FGGRN
;;
ideapad.untrepid.com)
FG1=$FGGRN
FG2=$FGBLU
;;
esac
export PS1="\[$BOLDM\]\[$FG1\]\u@\h:\[$FG2\]\W\[$FGYLO\] \$ \[$RESET\]"